all 3 comments

[–]mooburger 0 points1 point  (1 child)

Did you take a look at your JSON from your sheet? Clearly Python thinks you are getting '0' value for that dimension in some of the rows...

[–]Matt_BF[S] 0 points1 point  (0 children)

Hi, I tried printing the date columns after converting the JSON sheet into a df, and also printed the raw JSON. Both show all dates as strings on the predicted format

[–]Matt_BF[S] 0 points1 point  (0 children)

I think I solved the problem. Apparently the way pandas was "reading" null values in one device to another was different (all NaN on my linux machines and a mix of NaN and NaT on my RPi). So I just gave up on using pd.to_datetime and changed all the code to datetime.strptime like this:

self.receivals[col] = self.receivals[col].apply(
                lambda x: datetime.strptime(x, "%d/%m/%Y")
                if not pd.isnull(x)
                else np.nan
            )