Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

add a column to a CSV file in Python

df = pd.read_csv("sample.csv")
df["new_column"] = "abc"
df.to_csv("sample.csv", index=False)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #column #CSV #file #Python
ADD COMMENT
Topic
Name
3+9 =