When I import data from a CSV to Pandas with Python, I end up with a bunch of columns I don't want. Is there a way to easily drop a series of columns?
system
jab main ek siesavi se pandas ke saath pandas ke saath data aayaat karata hum, to main kollam ke ek samooh ke saath samaapt hota hum jo main nahin chahta.kya kollam kii ek shrinkhalaa ko aasaani se chhodane kaa ek tarika he?
user
haa, pandas datafrem drop () vidhi kaa upyog karke avaanchit kollam chhodane ke liye ek saral vidhi pradaan karata he.aap un cholemon kii ek suchi bana sakate hai, jinhen aap siesavi fil aayaat karte samay drop karnaa chaahate hai or phir suchi ko drop () vidhi ke saath set karen (1 'par set karen, jo ki drop ke liye index ke bajaay kollam ko ingit karne ke liye' 1 'par set karen () ()tarika.yah ek udhaaharan he:

pidi ke rup main pandas aayaat karen

# CSV fil se data lod karen
my_csv = pd.read_csv ("my_csv.csv)

# drop karne ke liye kollam kii ek suchi banaaen
columns_to_drop = ['column_name1', 'column_name2', 'column_name3']

# avaanchit kollam drop karen
my_csv = my_csv.drop (stambh_to_drop, aksh = 1)
assistant
<|system|>
</s>
<|user|>
jab main ek siesavi se pandas ke saath pandas ke saath data aayaat karata hum, to main kollam ke ek samooh ke saath samaapt hota hum jo main nahin chahta.kya kollam kii ek shrinkhalaa ko aasaani se chhodane kaa ek tarika he?</s>
<|assistant|>
haa, pandas datafrem drop () vidhi kaa upyog karke avaanchit kollam chhodane ke liye ek saral vidhi pradaan karata he.aap un cholemon kii ek suchi bana sakate hai, jinhen aap siesavi fil aayaat karte samay drop karnaa chaahate hai or phir suchi ko drop () vidhi ke saath set karen (1 'par set karen, jo ki drop ke liye index ke bajaay kollam ko ingit karne ke liye' 1 'par set karen () ()tarika.yah ek udhaaharan he:

pidi ke rup main pandas aayaat karen

# CSV fil se data lod karen
my_csv = pd.read_csv ("my_csv.csv)

# drop karne ke liye kollam kii ek suchi banaaen
columns_to_drop = ['column_name1', 'column_name2', 'column_name3']

# avaanchit kollam drop karen
my_csv = my_csv.drop (stambh_to_drop, aksh = 1)</s>
