OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

I have a dataset in the form of a CSV file. What is the easiest way to split it into X amount of CSV files from one big file. [Python, Pandas, Csv] [d

  • Thread starter Thread starter Timo
  • Start date Start date
T

Timo

Guest
I have a dataset in the form of a CSV file. Now this one file is too big for my liking, and i want to split it up into say four smaller files but all with the exact same structure and no data lost.

In the last months i have been practicing Python and want to learn data manipulation now.

What is the easiest way to achieve this in Python with Pandas and / or maybe CSV.

I tried adding each row to an empty list and then adding the first quarter to a file, then the next. But i got stuck around there.
<p>I have a dataset in the form of a CSV file.
Now this one file is too big for my liking, and i want to split it up into say four smaller files but all with the exact same structure and no data lost.</p>
<p>In the last months i have been practicing Python and want to learn data manipulation now.</p>
<p>What is the easiest way to achieve this in Python with Pandas and / or maybe CSV.</p>
<p>I tried adding each row to an empty list and then adding the first quarter to a file, then the next. But i got stuck around there.</p>
 
Top