Solution
You MUST first check the type of ticker_add
.
type(ticker_add)
Adding new row to a dataframe
Assuming your
ticker_add
is a dictionary with the column names of the dataframedf
as the keys, you can do this:df.append(pd.DataFrame(ticker_add))
Assuming it is a single non-array-like input, you can do this:
# adds a new row for a single column ("Ticker") dataframe df = df.append({'Ticker': ticker_add}, ignore_index=True)
References
CLICK HERE to find out more related problems solutions.