Computer scienceData scienceInstrumentsPandasStoring data with pandas

Reading data in pandas

Change columns' names

Report a typo

Download the provided file, read it with Pandas, and use one of the parameters to specify that the columns should be named row number 3.

The answer should be a copy of the output of print() function for the first 3 rows of the dataset as shown in the example below.

# Copy the output and paste it as an answer. 

#     Mike  38.0   Toronto
# 0  David  52.0  New York
# 1  Alice   NaN    Berlin
# 2   Mike  21.0      Rome
Hint

Review the Data file options: sep (delimiter), header, index_col section of the theory.

Write code in your IDE to process the text file and display the results below

Create a free account to access the full topic