How to block dataiku dataset from formatting date values?
I've some date values which get automatically format when I pass that through dataiku dataset. I don't want to format those dates. I just want them in the same format in which they are before formatting.
Before formatting
After formatting
Operating system used: windows
Best Answer
-
Alexandru Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,226 Dataiker
Hi,
Is this an SQL dataset?
DSS would typically change the format automatically unless you parse the data in the prepare recipe.
https://doc.dataiku.com/dss/latest/preparation/dates.html
If you want to keep the original format simply change the type to "string" in your dataset schema instead of date type and DSS will keep it as a string or remove the Read SQL "date" as DSS option in the input dataset settings.
If you want to convert it from the parsed format back to MM/dd/yyyy you can do so with prepare processor( Format date with custom format) and se the type to string.
Hope that helps!
Answers
-
Hi AlexT, Thanks for your reply. I've fixed this by mentioning the datatype of dataframe's columns names.
Ex: bucketOutput_df = bucketOutput_df.astype({"bucketStatusDate": str, "bucketSpudDate": str})
By the way, I was reading the data from an EXCEL sheet.
I was reading from an EXCEL sheet & trying to put that to Dataiku dataset.