Nov-14-2022, 05:09 PM
(This post was last modified: Nov-14-2022, 05:09 PM by deanhystad.)
Quote:Unfortunately when the CSV or dataframe reaches 365 records, it either reads the first 365 records or write the first 365 records
I assume you mean when the dataframe is larger than 365 records. Correct?
I think the problem is elsewhere. 365 rows (records?) is pretty small for pandas.
This program creates a dataframe with 1000 rows, each row having 1000 columns. It writes just fine to a csv file, and when I read it back in, the new dataframe equals the old.
import pandas as pd data = {str(i):list(range(1000)) for i in range(1000)} df = pd.DataFrame(data) df.to_csv("test.csv", index=False) df2 = pd.read_csv("test.csv") print(df2.equals(df))
Output:True
What have you done to try and debug this problem? 365 is a really interesting number. I can think of all kinds of code I could write that would stop working at 365, but the fault would be mine, not pandas. Can you post the code that is writing your csv file?