Open linamnt opened 1 month ago
thanks for the request - I don't think there's any chance of non-string column names being allowed, but
Or perhaps better error messaging...
seems addressable
There's 0 chance we'll allow anything except strings as column names. I'll edit the title to state the error message should be improved.
Just to clarify, I was not suggesting for the column name to be anything else but a string, but that the handling of arrays of numbers or other lists of items that can be cast as str could be turned into strings in the background.
But either way, seems the best solution is for the error message to be more informative! Thanks!
Description
I would like to set the column values of a DataFrame from a list of numbers designating the time bin of the data (i.e. for a histogram). This does not currently seem possible, and instead I have to cast the values as strings for this to work. This is due to the following line of code which assumes non-string column names are indexable. See below for an example. Or perhaps better error messaging...
I get the following error indicating that when the the column name is not a string, it tries to index the column name and take the first element which of course we can't do as a float.
Thanks for your consideration!