You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
python main.py got error
Traceback (most recent call last):
File "main.py", line 111, in
tf.app.run()
File "/home/xxx/.local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "main.py", line 100, in main
target_symbol=FLAGS.stock_symbol,
File "main.py", line 58, in load_sp500
info = info.sort('market_cap', ascending=False).reset_index(drop=True)
File "/home/weilo/.local/lib/python2.7/site-packages/pandas/core/generic.py", line 5067, in getattr
return object.getattribute(self, name)
AttributeError: 'DataFrame' object has no attribute 'sort'
seems sort has been replaceed by sort_values, but not sure how to change to make it work
The text was updated successfully, but these errors were encountered:
Change this line:
info = info.sort('market_cap', ascending=False).reset_index(drop=True)
to this:
info = info.sort_values(by='market_cap', ascending=False).reset_index(drop=True)
python main.py got error
Traceback (most recent call last):
File "main.py", line 111, in
tf.app.run()
File "/home/xxx/.local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "main.py", line 100, in main
target_symbol=FLAGS.stock_symbol,
File "main.py", line 58, in load_sp500
info = info.sort('market_cap', ascending=False).reset_index(drop=True)
File "/home/weilo/.local/lib/python2.7/site-packages/pandas/core/generic.py", line 5067, in getattr
return object.getattribute(self, name)
AttributeError: 'DataFrame' object has no attribute 'sort'
seems sort has been replaceed by sort_values, but not sure how to change to make it work
The text was updated successfully, but these errors were encountered: