Mar-05-2023, 02:47 PM
Hello , i am SAS programmer in data analytics world. new to python .
I just downloaded Python 3.11 on my personal Windows laptop
Question on importing csv and data manipulation.
Below is python code I copied from somewhere , that is supposed to import csv file. ( I think)
It seems to work but my question , if i want to drop or rename certain column, how do i do that?
For example, the Table contains a column named Location, if i want to remove or drop column ,how can I add my coding
in the following python code :
TC
I just downloaded Python 3.11 on my personal Windows laptop
Question on importing csv and data manipulation.
Below is python code I copied from somewhere , that is supposed to import csv file. ( I think)
It seems to work but my question , if i want to drop or rename certain column, how do i do that?
For example, the Table contains a column named Location, if i want to remove or drop column ,how can I add my coding
in the following python code :
import csv with open('sample.csv', newline='', encoding='utf-8') as f: reader = csv.reader(f) for row in reader: print(row)Thank you !
TC