Question
1. Select all that apply: Suppose you want to create a pandas DataFrame. Which of the following can be the input of pd.read_csv ? a.
1. Select all that apply:
Suppose you want to create a pandas DataFrame. Which of the following can be the input of pd.read_csv?
a. Path to a comma-separated (CSV) file saved on your local computer
b. A Jupyter Notebook
c. Python dictionary-like object
d. URL to a CSV file stored in a publicly accessible Internet domain
e. Path to an Excel (XLSX) file saved on your local computer
2. Select one or more answers that apply:
Suppose you have created a pandas DataFrame in your workspace, and you would like to export it with method
a. The exact column name representing the index (row names)
b. Whether there should be an index (row names)
c. Path to save the file
d. Whether there should be a header (row names)
e. The exact column name representing the header (colum names)
3. Select all that apply:
You are reading a CSV file with the following columns:
date
customer_count
customer_residential_state
using the following command:
data = pd.read_csv("my-data.csv")
Which of the following should be used to obtain the field "date"?
a. data.index
b. data["DATE"]
c. data.Date
d. data.columns
e. data["Date"]
f. data.DATE
g. data["date"]
h. data.date
4.
Select all that apply:
Suppose you want to transpose a pandas DataFrame. That is, you want the rows to be columns and vice versa. Which of the following command(s) could you use?
df is a pandas dataframe.
a. df.T()
b. df.T
c. df.transpose()
d. transpose(df)
e. df.transpose
f. t(df)
g. T(df)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started