Section 2 Answer the question in this section regarding the Python "pandas' package. 10) Write your Python code to creat
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Section 2 Answer the question in this section regarding the Python "pandas' package. 10) Write your Python code to creat
Section 2 Answer the question in this section regarding the Python "pandas' package. 10) Write your Python code to create a dataframe named "df as shown below from a dictionary. Notice that the left-most column of index numbers was automatically created. >>> df state year pop Ohio 2000 1.5 Ohio 2001 1.7 2 Ohio 2002 3.6 3 Nevada 2001 2.4 4 Nevada 2002 2.9 5 Nevada 2003 3.2 11) Write your Python code to create a dataframe named "df as shown below from a list of lists. Notice that the left-most column of index numbers was automatically created. And don't forget to assign proper column names to the dataframe also. >>> df state year pop e Ohio 2000 1.5 chio 2001 1.7 2 Chio 2002 3.6 3 Nevada 2001 2.4 4 Nevada 2002 2.9 5 Nevada 2003 3.2 12) Write your Python code to create a dataframe named "housing_tr from file *california_housing train.csv under /content/sample_data/folder. Notice that sample_data" folder is the default folder of Google Colab and you can see its contents by "! Is /content/sample_data-al" command in your Google Colab code box 13) How many columns and rows do exist in the dataframe created in the previous question? <<< 0 1 1