Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

Why the concat() function is not avaiable for a dataframe object?

$
0
0

Im trying to extract every row i cycle and copy that to another dataframe but the functions append,concat are not showing..

import pandas as pddf_excel = pd.read_excel('excel_file.xlsx')df_output = pd.DataFrame(columns=df_excel.columns)for index, row in df_excel.iterrows():  df_output = pd.concat([df_output, riga.to_frame().T], ignore_index=True)

When i run the code i get this error : AttributeError: 'DataFrame' object has no attribute 'concat'Usually after writing the first 2 letter i get the function name in visual studio code, but dataframe.concat() seems an error

But if i write instead:

pd.concat()

concat() shows in the funcions list of visual studio


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>