Tutorial
Tutorial
1. print(df.describe())
2. print(df.stats())
3. print(describe(df))
4. print(stats(df))
1. print(df.loc['cl3','cl5'])
2. print(df.loc[['cl3','cl5']])
3. print(cls.iloc[['cl3','cl5']])
4. print(df.iloc['cl3','cl5'])
df.clmn.value_counts()
df.loc[df.clmn==10,:]
print(df.iloc[2:5])
1. a two-dimensional ndarray
2. lists, dictionaries, or Series.
3. Pandas DataFrame
4. All the above
1. print(df.dtype)
2. print(dtypes(df))
3. print(df.dtypes)
4. None of the above
print(len(data.columns))
1. 5
2. 10
3. 15
4. 50
1. JSON
2. Excel
3. HTML
4. All the above
12. What is the correct syntax to create a Pandas Series from a Python
list?
1. pd.createSeries(mylist)
2. pd.Series(mylist)
3. pd.getSeries(mylist)
1. myseries[0]
2. myseries.get(0)
3. get(myseries,0)
14.What is the correct syntax to add the labels "x", "y", and "z" to a
Pandas Series?
1. pd.dataframe(data)
2. pd.DataFrame(data)
3. pd.df(data)
16.What is the correct syntax to return the first row in a Pandas
DataFrame?
1. df.loc[0]
2. df[0]
3. df.get[0]
17.What is the correct syntax to return both the first row and the
second row in a Pandas DataFrame?
1. df.[[0-1]]
2. df.[[0, 1]]
3. df.loc[[0, 1]]
4. df.loc[[0-1]]
18.What is the correct Pandas function for loading CSV files into a
DataFrame?
1. ReadFile()
2. read_csv()
3. read_file()
4. ReadCSV()
19.What is the correct Pandas function for loading JSON files into a
DataFrame?
1. ReadJSON()
2. ReadFile()
3. read_file()
4. read_json()
20.What is the correct syntax to load a Python Dictionary called "data"
into a Pandas DataFrame?
1. pd.ReadJSON(data)
2. pd.load_json(data)
3. pd.DataFrame(data)