nomic icon indicating copy to clipboard operation
nomic copied to clipboard

Drop indices on pandas dataframes

Open bmschmidt opened this issue 1 year ago • 4 comments

Adding a dataframe gives this error:

ValueError: Underscore fields are reserved for Atlas internal use: __index_level_0__

but if we just run reset_index() before uploading it'll be fine.

bmschmidt avatar Oct 11 '23 23:10 bmschmidt

hi in which file you are getting this error Kindly specify

hvsesha avatar Oct 19 '23 05:10 hvsesha

This is an error thrown from data_inference.py in some cases when a pandas frame is uploaded.

bmschmidt avatar Oct 19 '23 12:10 bmschmidt

Hi, I have the same problem with the map_data function. I am passing a numpy embedddings array and a pandas df

dataset = atlas.map_data(data=df_filtered, embeddings=df_filtered.loc[:, 'dim_0':'dim_199'].to_numpy(), id_field='word', description="A test map of some words from Weimar to BRD 1" )

patschw avatar Mar 15 '24 10:03 patschw

Thanks for the report. We'll prioritize fixing this, but I think that if you run reset_index() on your df before passing it to an Atlas method, it will hopefully resolve your issue.

bmschmidt avatar Mar 15 '24 14:03 bmschmidt