Dataset.Tabular.register_pandas_dataframe - Error saving date column
Hello,
I used the Dataset.Tabular.register_pandas_dataframe function to save the dataset and it appeared in the log that the data was saved successfully.

However, when returning the data from the dataset, the string ERROR appeared in all rows of the date column.

Do you know how to solve the problem, please?
Best regards, Cristina
Detalhes do documento
⚠ Não edite esta seção. É necessário para a vinculação do problema do docs.microsoft.com ➟ GitHub.
- ID: 9b1aee32-5a1f-2ef1-ee76-30b17999db87
- Version Independent ID: f4785272-a81d-e9cc-c6a5-9d41c8dcd90b
- Content: azureml.data.dataset_factory.TabularDatasetFactory class - Azure Machine Learning Python
- Content Source: AzureML-Docset/stable/docs-ref-autogen/azureml-core/azureml.data.dataset_factory.TabularDatasetFactory.yml
- Service: machine-learning
- Sub-service: core
- GitHub Login: @DebFro
- Microsoft Alias: debfro
Hi, crisansou,
I tried to reproduce your problem but didn't see the failure. Do you mind sharing some information for investigation? Below information will be very helpful:
- Your subscription Id
- Your workspace name
- Your region
Thank you!
Hi @YuandaXu ,
Please try this code, if you are unable to reproduce I pass you the requested data. The workspace is in West Europe region:
import pandas as pd import datetime as dt import azureml.core from azureml.core import Workspace, Datastore, Dataset
print("Azure ML Version", azureml.core.VERSION)
Get Workspace
ws = Workspace.from_config()
Get Datastore
datastore = Datastore.get_default(ws)
Generating a dummy dataset
df = pd.util.testing.makeDataFrame() df['data_exec'] = dt.date.today() df.head()

try: Dataset.Tabular.register_pandas_dataframe(dataframe = df, target = datastore, name = 'dummy_dataset', description='Dummy Dataset') except Exception as ex: print('Error register_pandas_dataframe: ', ex)


Best regards, Cristina
Hi, crisansou,
I tried to reproduce your problem but didn't see the failure. Do you mind sharing some information for investigation? Below information will be very helpful:
- Your subscription Id
- Your workspace name
- Your region
Thank you!
Thanks, Cristina!
I tried your steps and did see the error. Let me confirm with our experts for more details, will back to you soon.
Hi, Cristina,
Some updates:
-
I checked dtypes of dataframe, it turned out the 'data_exec' is datetime.date instead of datetime64, which currently is not supported in data process engine therefore the unsupported values was replaced by string "ERROR" in default.
-
As a workaround, either a datetime.datetime object or a string would work here, so you can try replace it with either a datetime.datetime or convert it to string. I validated both, they do work.
-
I also double confirmed supported objects, basically in current stage, we support numpy arrays with datetime64 type, other objects supported would be strings, every other primitive type (numbers, bools) should be stored in numpy arrays specific to that type.
Hopefully above information is helpful.
Thanks!
Hi @YuandaXu,
Thanks for the updates! I used datetime64 and string types and it worked in both cases.


Best regards, Cristina
Hi, Cristina,
Some updates:
- I checked dtypes of dataframe, it turned out the 'data_exec' is datetime.date instead of datetime64, which currently is not supported in data process engine therefore the unsupported values was replaced by string "ERROR" in default.
- As a workaround, either a datetime.datetime object or a string would work here, so you can try replace it with either a datetime.datetime or convert it to string. I validated both, they do work.
- I also double confirmed supported objects, basically in current stage, we support numpy arrays with datetime64 type, other objects supported would be strings, every other primitive type (numbers, bools) should be stored in numpy arrays specific to that type.
Hopefully above information is helpful.
Thanks!