We Are Going To Discuss About TypeError: cannot concatenate object of type ”; only Series and DataFrame objs are valid. So lets Start this Python Article.
<h2 id="h-typeerror:-cannot-concatenate-object-of-type-'’;-only-series-and-dataframe-objs-are-valid”>TypeError: cannot concatenate object of type ”; only Series and DataFrame objs are valid- How to solve TypeError: cannot concatenate object of type '
'; only Series and DataFrame objs are valid s1
is already a list. Doing what you did called pd.concat with a list of a list with DataFrames, which pandas doesn't allow. You should do it like this instead:s2=pd.concat(s1)
- TypeError: cannot concatenate object of type '
'; only Series and DataFrame objs are valid s1
is already a list. Doing what you did called pd.concat with a list of a list with DataFrames, which pandas doesn't allow. You should do it like this instead:s2=pd.concat(s1)
Solution 1
s1
is already a list. Doing what you did called pd.concat with a list of a list with DataFrames, which pandas doesn’t allow. You should do it like this instead:
s2=pd.concat(s1)
Original Author Thomas Q Of This Content
Conclusion
So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.