datreant / datreant.data

convenient data storage and retrieval in HDF5 for Treants
http://datreant.org/
BSD 3-Clause "New" or "Revised" License
1 stars 1 forks source link

hide pytables naming NatrualNameWarnings #8

Open kain88-de opened 8 years ago

kain88-de commented 8 years ago

I have a dataframe containing names like out-99. This means I can't use it as a python attribute name in pandas and neither in pytables. Saving the treant pytables gives an annoying NaturalNameWarning: object name is not a valid Python identifier: 'out-99_dtype' .... Since this is only internally handled by datreant it would be good to silence those warnings.

dotsdl commented 8 years ago

Agreed. However, note that using names like this make it impossible to retrieve subselections of rows based on column criteria using the where keyword on data.retrieve. Happy to silence it, but that's most of what that warning means for users.

kain88-de commented 8 years ago

We can silence it and issue our own warning that this will result in problems using where with data.retrieve. From the pytables warning there is no clue what the consequence is for a datreant user.

dotsdl commented 8 years ago

This is a good solution. We'll do that.