UserWarning - ensure parsing is consistent and as-expected, please specify a format
Hello!
I'm pulling a Jira dataset from Domo, there are 534 columns and I'm using the method below:
domo_dssd = session.ds_get(table.get("domo_dssd"))
This returns the error:
[c:\Users\name\venv\lib\site-packages\pydomo\__init__.py:201](file:///C:/Users/name/venv/lib/site-packages/pydomo/__init__.py:201): UserWarning: Could not infer format, so each element will be parsed individually, falling back to `dateutil`. To ensure parsing is consistent and as-expected, please specify a format.
df[col] = to_datetime(df[col])
I presume this is due to a field that has mixed dtypes but there's no programmatic method to check prior to importing the data. Is there a method for specifying columns during the call and perhaps asserting their dtype? This error seems to relate to datetime fields (based on online results) where pd.datetime() has not included a formatting pattern.
Hello @NathanHGayle,
I'm going to log this in a ticket for us to triage. I think that we export the data with one format in the back-end, so it may be as simple as just explicitly setting that format in the call to to_datetime.
@samrands OK! How do I go about doing this?
@NathanHGayle I think the change needs to be made in pydomo. You're welcome to create a PR, otherwise we'll get to it when we can. I believe our date format is ISO 8601, however I'd need to double-check that.
@NathanHGayle See https://github.com/domoinc/domo-python-sdk/pull/109 and https://github.com/domoinc/domo-python-sdk/pull/111 which I think will fix your issues. Once I've merged it in I'll push it up to pypi.