0
my_columns=['Ticker', 'Stock Price', 'Market Capitalization',' Number of Shares to Buy']
kushdf= pd.DataFrame(columns=my_columns)
kushdf

I want to add this data to kushdf:

Ticker: AAPL
Stock Price: 192.4600
Market Cap: 3027145851000
Number of Shares to Buy: 'N/A'

.append isn't working and when .concat is used its showing 'RecursionError: maximum recursion depth exceeded'

What do I do?

mozway
  • 194,879
  • 13
  • 39
  • 75
  • Store your data in a regular list or dict then use `pd.concat` or `pd.DataFrame` to create your dataframe. Don't create an empty dataframe then append or concat new records, it's a bad an inefficient practice. – Corralien Jul 05 '23 at 22:02

0 Answers0