Python Pandas program to import a CSV file

In this python pandas program, we will import a CSV file using the pandas library.

Steps to solve the program
  1. Import pandas library as pd.
  2. Now import a CSV file using pd.read_csv(“file name”).
  3. Then print the output.
				
					import pandas as pd
df = pd.read_csv("file name")
print(df)
				
			

replace NaNs with the median value in a DataFrame

import an xlsx file

1 thought on “Python Pandas program to import a CSV file”

Leave a Comment