Closed PietropaoloFrisoni closed 1 year ago
Thanks for the fix. I tested it and it does work. But I'm thinking that it would probably be a good idea to use concat
already.
The following should work:
self.portfolio = pd.concat(
[self.portfolio, stock.investmentinfo.to_frame().T], ignore_index=True
)
What do you think?
The formatting (3 lines) is fine. Thanks for the change.
The "append" method in Pandas is deprecated since version 1.4.0.
It can still be called with the underscore prefix, which allows to easily update the code (and it goes very well with black formatter).
In future versions, it might be necessary to replace "DataFrame.append" with "Pandas.concat".