Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Added on September 21, 2023 9:12PM
Likes: 1
Replies: 17
I have a string column in a table that contains values like "00123456" when I import the table into jupyter with the cmd. get_dataframe the column type becomes integer and I get the value 123456 without 00. how can i fix this problem and get the same value and data type
What is the data type of that column in the schema of the dataset? (Dataset => Settings => Schema). Where is the dataset stored on? (what type of dataset?).
The type is string and the meaninig is text
What do you get if you do this in Jupyter for for your dataframe object:
dataset_df.info()
i get this ,
for the column concerned its type after import into jupyter is object but when I check the values I find them without 00
If you want to disable pandas' type inference, try passing infer_with_pandas=False to the get_dataframe call
I tested this with the parameter keep_default_na=True, but I received an error :
ValueError: Integer column has NA values in column 15
in my table i have 2 millions rows and when i add the parametrs infer_with_pandas=False, keep_default_na=True,limit=10000 to import just the first 10.000 rows it goes very well and the data type is not changed but with the all rows it gives an error
how to Specify dtype option on import with get_dataframe ?
For get_dataframe, the dtypes are either inferred by pandas or forced from the dataset's schema.
If you want to force the dtypes, you can use iter_dataframes_forced_types.
thank you for your answer, and if I want to import my data to have a dataframe with iter_dataframes_forced_types how can I do it because I didn't understand the code
yes that's what I did and it gave me this like the image and now how to have it in the form of a dataframe table
in each column we have storage type and meaning and i want to force the meaning of a column to text with the formula or python code on a prepared recipe how can i do this ?