I'm trying to make an etl script but when running the extract function im getting this error 'DataFrame' object has no attribute 'append'
the function
import pandas as pd
from datetime import datetime
import glob
def extract_from_csv(file_to_process):
dataframe = pd.read_csv(file_to_process)
return dataframe
def extract():
extracted_data = pd.DataFrame(columns=["Term", "Amount"])
for csvfile in glob.glob("*.csv"):
extracted_data = extracted_data.append(extract_from_csv(csvfile), ignore_index=True)
return extracted_data
I don't know what to try this is function i have been using for the past two etl scripts