Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
I have a function which will give me a dataframe
olddataframe
as output in a loop, i want to combine them into a single Dataframe as
newdataframe
by appending and i tried the below code
newdataframe=pd.DataFrame
newdataframe.append(olddataframe,ignore_index=False)
it throws an error like below
TypeError: append() missing 1 required positional argument: 'other'
what needs to be done to fix this
I suggest create list of DataFrame
s and then concat
only once, if performance is important:
dfs = []
for olddataframe in data:
#data processing
dfs.append(olddataframe)
newdataframe = pd.concat(dfs, ignore_index=False)