I have not looked too closely at it myself, but the RigidBody2D Platformer character demo from the Godot demo repository seems to have acceleration and decelerations implemented. You might be able to use similar code for friction by checking if the player is colliding with a wall and applying acceleration/deceleration if they are.
(Side note: Welcome to the forums!)