You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to append an empty dataframe to another empty one. This fails if at least one of them has a column defined. Below is the code snippet to generate the error.
import numpy as np
import pandas as pd
pd.__version__
#'0.10.1'
np.__version__
#'1.7.0'
a = pd.DataFrame()
b = pd.DataFrame()
a.append(b) # works
a = pd.DataFrame(columns=['asdf'])
b = pd.DataFrame(columns=['asdf'])
a.append(b) # fails
a = pd.DataFrame(columns=['asdf'])
b = pd.DataFrame()
a.append(b) # fails
a = pd.DataFrame()
b = pd.DataFrame(columns=['asdf'])
a.append(b) # fails
Exception is: ValueError: need at least one array to concatenate
The text was updated successfully, but these errors were encountered:
I am trying to append an empty dataframe to another empty one. This fails if at least one of them has a column defined. Below is the code snippet to generate the error.
Exception is: ValueError: need at least one array to concatenate
The text was updated successfully, but these errors were encountered: