Python|Excluding columns|Jupyter Notebook Question write a function to exclude columns in csv file. in progress 0 Python razack_ar 55 years 2 Answers 765 views Member 3
Answers ( 2 )
import numpy as np
import pandas as pd
import matplot.lib as pyplot
import seaborn as sns
then import csv file in jupyter notebook
df = pd.read_csv(‘C:\Users\Ibrahim\Downloads\train_u6lujuX_CVtuZ9i.csv’) ….(for example)
tdf = df.drop([‘xxx’, ‘yyy’, ‘zzzz’], axis=1)
tdf.head()
note:xxx,yyy,zzz=column name
import pandas as pd
df = pd.read_csv(“nr_bankloans.csv”)
df.drop([“ed”], axis=1, inplace=True)