Skip to content

AttributeError: 'DataFrame' object has no attribute 'sort' #32

@gms2009

Description

@gms2009

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions