'module' object has no attribute 'cut'

RedRaven

I am trying to use the pandas "cut" method, but am getting an object has no attribute error. I've imported pandas and it works for other commands. Is this a known issue or am I missing something? I restarted Python thinking this might just be a random bug but it doesn't seem to be...

Full error below:

python 2.7.3 (default, Sep 26 2013, 20:08:41) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas as pd 
>>> day1 = pd.read_csv('nyt1.csv') #<-- THIS WORKS
>>> pd.cut(day1.Age,[18,24,34,44,54,64,],right=False)[:30] #<-- THIS DOES NOT?
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'cut' 
>>> pd
<module 'pandas' from '/usr/lib/pymodules/python2.7/pandas/__init__.pyc'> 
>>> pd.__version__
'0.7.0'

EDIT: Included the version of pandas.

three_pineapples

The cut function was introduced in pandas v0.8.0. Update to a newer version and your code should work!

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Custom Module - Object Has No Attribute

From Dev

AttributeError: 'module' object has no attribute

From Dev

'module' object has no attribute 'Serial'

From Dev

'module' object has no attribute 'DataFrame'

From Dev

AttributeError: 'module' object has no attribute

From Dev

'module' object has no attribute 'GeoSQLCompiler'

From Dev

AttributeError: 'module' object has no attribute

From Dev

module object has no attribute oauth

From Dev

'module' object has no attribute 'get'?

From Dev

module' object has no attribute 'SelectDateWidget'

From Dev

'module' object has no attribute 'GeoSQLCompiler'

From Dev

'module' object has no attribute 'shortcuts'

From Dev

'module' object has no attribute 'get'?

From Dev

'module' object has no attribute 'TK'

From Dev

AttributeError:'module' object has no attribute 'call' :Python

From Dev

Pylab - 'module' object has no attribute 'Figure'

From Dev

AttributeError: 'module' object has no attribute 'tk'

From Dev

AttributeError: 'module' object has no attribute 'cache'

From Java

AttributeError: 'module' object has no attribute 'tests'

From Dev

'module' object has no attribute 'views' django error

From Dev

AttributeError: 'module' object has no attribute 'TestCase'

From Dev

AttributeError: 'module' object has no attribute 'version'

From Dev

Mtaplotlib AttributeError: 'module' object has no attribute 'pyplot'

From Dev

Using numpy 'module' object has no attribute 'array'

From Dev

AttributeError: 'module' object has no attribute 'plotting'

From Dev

Python - 'module' object has no attribute 'randrange'

From Java

AttributeError: 'module' object has no attribute 'request'

From Java

tensorflow:AttributeError: 'module' object has no attribute 'mul'

From Java

AttributeError: 'module' object has no attribute 'urlretrieve'

Related Related

  1. 1

    Custom Module - Object Has No Attribute

  2. 2

    AttributeError: 'module' object has no attribute

  3. 3

    'module' object has no attribute 'Serial'

  4. 4

    'module' object has no attribute 'DataFrame'

  5. 5

    AttributeError: 'module' object has no attribute

  6. 6

    'module' object has no attribute 'GeoSQLCompiler'

  7. 7

    AttributeError: 'module' object has no attribute

  8. 8

    module object has no attribute oauth

  9. 9

    'module' object has no attribute 'get'?

  10. 10

    module' object has no attribute 'SelectDateWidget'

  11. 11

    'module' object has no attribute 'GeoSQLCompiler'

  12. 12

    'module' object has no attribute 'shortcuts'

  13. 13

    'module' object has no attribute 'get'?

  14. 14

    'module' object has no attribute 'TK'

  15. 15

    AttributeError:'module' object has no attribute 'call' :Python

  16. 16

    Pylab - 'module' object has no attribute 'Figure'

  17. 17

    AttributeError: 'module' object has no attribute 'tk'

  18. 18

    AttributeError: 'module' object has no attribute 'cache'

  19. 19

    AttributeError: 'module' object has no attribute 'tests'

  20. 20

    'module' object has no attribute 'views' django error

  21. 21

    AttributeError: 'module' object has no attribute 'TestCase'

  22. 22

    AttributeError: 'module' object has no attribute 'version'

  23. 23

    Mtaplotlib AttributeError: 'module' object has no attribute 'pyplot'

  24. 24

    Using numpy 'module' object has no attribute 'array'

  25. 25

    AttributeError: 'module' object has no attribute 'plotting'

  26. 26

    Python - 'module' object has no attribute 'randrange'

  27. 27

    AttributeError: 'module' object has no attribute 'request'

  28. 28

    tensorflow:AttributeError: 'module' object has no attribute 'mul'

  29. 29

    AttributeError: 'module' object has no attribute 'urlretrieve'

HotTag

Archive