I have imported a .csv
file using df=pandas.read_csv(.....)
. I calculated the number of rows in this dataframe df
using print(len(df))
and it's size had some 30 rows less than the originally imported file. BUT, when I exported df
directly after import as .csv
(without doing any operation on this dataframe df
) using df.to_csv(....)
, then the exported file had the same number of rows as the originally imported .csv
file.
It's very hard for me to debug so as to explain the diffference between the lengths of the dataframe on one hand and both imported and exported .csv file on the other, as there are more than half-a-million rows in the dataset. Can anyone provide some hints as to what can cause such a bizzare behavior?