Closed dpalmasan closed 2 years ago
I took a deeper look, it seems the problem is my column for case_id is an Int64
, somehow it cannot be converted to string (Maybe my pandas version is old, I have seen some related issues in pandas
repo).
Dear @dpalmasan
Thank you for the question. I would suggest you to update Pandas to the latest version (pip install -U pandas).
It may be that in your case, you converted the dataframe to Pandas starting from a Spark dataframe. Since the data types may be different than the standard Pandas ones, this would explain the problem. Is this the case?
@fit-alessandro-berti Sure, I think this issue can be closed, it was probably a known pandas
issue that probably is already fixed. Sadly I cannot test it as I cannot update pandas in the machine I am working on; However I fixed in my case by reading directly the id
as a string from the data source.
Context
Hello, I have a dataset in which I have three columns:
But when I run:
I get:
What I have tried
dfn = df.convert_dtypes()
, got the same errorAm I doing something wrong? I have followed the tutorial, I just changed the data source.