Data Frames and Data Manipulation
Example
# Load the pandas package
import pandas as pd# Import pandas
import pandas as pd
# Create data as key-value pairs
data = {'id': [1,2,3,4,5],
'gender': ["F", "M", "F", "M", "F"],
'age': [68, 54, 49, 28, 36]}
# Put the data into a data frame
df = pd.DataFrame(data)Exercises
Resources
Last updated
