I am facing this weird issue: I have a dataframe of 21 rows and 1 column. And the first column has 20 ints and the last entry is a string. When I am doing the type casting and trying to print the dataframe, its showing error.
df = dd.read_csv(“myFile.csv”)
df[“c1”] = df[“c1”].astype(“object”)
The data in myFile.csv looks something like this:
This throws an error. This is very unexpected as the documentation says that astype typecasts to the desired data type.
If this is how it is supposed to behave then can someone please tell me a way to typecast the columns. My usecase is some thing like this: I have a very big dataset and I need to infer the data type of a suspicious column and do computations.
Thanks and regards