If you take a look at the inspector while the sprite node is selected, you'll see a section called "Animation" and there, you can see there's an entry for "frame".
All of these variables can be accessed through script, and have virtually the same names (maybe with some underscores added.) Just set your sprite's frame variable to another number and the frame will change.
Intellisense will usually show you the proper variable, but if all else fails, remember that the docs have all the info you need about every node:
https://godot.readthedocs.io/en/latest/classes/class_sprite.html
int frame - Current frame to display from sprite sheet. vframes or hframes must be greater than 1.