Intellipaat Back

Explore Courses Blog Tutorials Interview Questions

Explore Tech Questions and Answers

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

0 votes
2 views
by (18.4k points)
Can we use pandas to csv() to add a data frame to my existing CSV file?

The structure of the CSV file is the same as the loaded data.

1 Answer

0 votes
by (36.8k points)

In the pandas, you can specify the write method in the CSV function. 'a' is used for appending. 

Code to be used:

df.to_csv('my_csv.csv', mode='a', header=False)

 If you are a beginner and want to know more about Data Science the do check out the Data Science course

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...