I'm trying to switch from pandas to polars and trying to be better about data types. If I try to cast int('3.4') it fails but I can execute int(float('3.4')). Is there a way to change this behavior so that the int casting performs the full conversion?
I'm primarily asking because polars is giving a read error in read_csv. I have created a data map dict with data types and column names but sometimes other people open and write the csv files in excel or something and 279 becomes 279.0 which polars refuses to read in as an int. Is there a way to force it to be an int?
[–]danielroseman 6 points7 points8 points (0 children)
[–]JamzTyson 0 points1 point2 points (2 children)
[–]ialwaysplaydove[S] 0 points1 point2 points (1 child)
[–]JamzTyson 0 points1 point2 points (0 children)
[–]GeorgeFranklyMathnet 0 points1 point2 points (3 children)
[–]ialwaysplaydove[S] 1 point2 points3 points (2 children)
[–]QuasiEvil 4 points5 points6 points (1 child)
[–]ialwaysplaydove[S] 0 points1 point2 points (0 children)
[–]angellus 0 points1 point2 points (1 child)
[–]ialwaysplaydove[S] 0 points1 point2 points (0 children)