import csv code example

Example 1: how to import csv in pandas

import pandas as pd

df = pd.read_csv (r'Path where the CSV file is stored\File name.csv')
print (df)

Example 2: import csv file in python

import pandas as pd

df = pd.read_csv (r'Path where the CSV file is stored\File name.csv')
print (df)

Example 3: import csv using python

import csv using python
credits: https://zetcode.com/python/csv/

Example 4: import csv

import pandas as pddf = pd.read_csv("/content/melb_housing.csv")df.columnsIndex(['Suburb', 'Address', 'Rooms', 'Type', 'Price', 'Method', 'SellerG', 'Date', 'Postcode', 'Regionname', 'Propertycount', 'Distance', 'CouncilArea'], dtype='object')