Python Flashcards
How do you load pandas?
Import pandas as pd
How do you load a csv file?
variable (eg ‘data’) = pd.read.csv(“file_name.csv”)
How to see the first 5 rows of a variable named ‘data’?
data.head()
How to see the list of all the columns in a variable name ‘data’?
data.columns
How to see the size of a dataset named ‘data’?
data.shape
What is the shortcut to add a block below in Jupyter?
Use Esc, b to add line below
What is the shortcut to add a block above in Jupyter?
Use Esc, a to add line above
What is the shortcut to delete a block in Jupyter?
Use Esc, x to delete a line
What is shortcut to undo in Jupyter?
Use Esc, z to undo
How to turn a block in to a markdown block (to create headings etc)?
Esc, m
How to turn a block back into an execution block?
Esc, y