BUG: wide_to_long fails/works depending on whether id variable is string/object #46044
Closed
2 of 3 tasks
Labels
Bug
Missing-data
np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
The wide_to_long function fails to transform a dataframe that has an id variable of type string, failing with this error message:
ValueError: No objects to concatenate
Expected Behavior
I would expect wide_to_long to behave identically, whether the id variable is of type
string
or typeobject
. Unless the documentation specifically stated that only typeobject
is supported.Installed Versions
I am running Pandas 1.4.1, but because once upon a time I tried to install a development environment to create a pull request, I'm being forever punished by my unforgiving OSX environment:
The text was updated successfully, but these errors were encountered: