To write a python program for reading content from a CSV file.
Import pandas as pd.
Read the CSV file using read_csv method
Use head and tail method to get the required contents from the file.
Use len() method to get the number of rows and columns
Print the output.
#To write a python program for reading content from a CSV file.
#eveloped by: M.Aadhithya
#Register Number: 22003465
import pandas as pd
df = pd.read_csv('nba.csv')
print(df.head(10))
print(df.tail())
print("rows",len(df.axes[0]))
print("columns",len(df.axes[1]))
Thus a python program is written to read the contents of a CSV file