To read files from csv files using python program.
First we want to import pandas.
Then we want to create csv file.
Both python and csv files are in the same folder.
Then write the revalent code in the python file
Then check the result.
# To read files from csv files using python program.
# Developed by: Shalini.k
# Register no: 22008827
import pandas as pd
df = pd.read_csv('nba.csv')
print(df.head(10))
print(df.tail())
print("Number of rows:",len(df.axes[0]))
print("Number of columns:",len(df.axes[1]))
The result for read from csv is came successfully