Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- data = {
- "calories": [420, 380, 390],
- "duration": [50, 40, 45]
- }
- #load data into a DataFrame object:
- df = pd.DataFrame(data)
- print(df)
- #Return row 0 and 1:
- #use a list of indexes:
- print(df.loc[[0, 1]])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement