I am trying to retrieve the rows and columns of a csv
file using python.
But I am unable to do so.
My code is:
import pandas as pd
data = pd.read_csv("data1.csv", nrows=1)
print(data)
This code prints the column name and the first row values. However, I want to display only specific columns and its respective row values.