talolard / MarketVectors

Implementations for my blog post [here](https://medium.com/@TalPerry/deep-learning-the-stock-market-df853d139e02#.flflpo3xf)
MIT License
260 stars 169 forks source link

df.sort deprecated #6

Closed zhivko closed 7 years ago

zhivko commented 7 years ago

I am getting error: P.columns = new_ind

P = P.sort(axis=1) # Sort by columns


AttributeError Traceback (most recent call last)

in () 1 P.columns = new_ind ----> 2 P = P.sort(axis=1) # Sort by columns c:\python35\lib\site-packages\pandas\core\generic.py in __getattr__(self, name) 3079 if name in self._info_axis: 3080 return self[name] -> 3081 return object.__getattribute__(self, name) 3082 3083 def __setattr__(self, name, value): AttributeError: 'DataFrame' object has no attribute 'sort' It seems sort is deprecated - now there is sort_values and sort_index. Can you adapt code please?
zhivko commented 7 years ago

solved by sort_index