问题解决ValueError: Unable to coerce to DataFrame, shape must be (0, 3): given (370, 3)

IF your code is like to this.
问题解决ValueError: Unable to coerce to DataFrame, shape must be (0, 3): given (370, 3)_第1张图片
An error appears as shown.

ValueError: Unable to coerce to DataFrame, shape must be (0, 3): given (370, 3)

You can make some changes.(remove [ ])

df_ensemble = pd.DataFrame(columns=[dfs[0].columns])

df_ensemble = pd.DataFrame(columns=dfs[0].columns)

你可能感兴趣的:(python,pandas)