AttributeError Traceback (most recent call last)
File ~/anaconda3/envs/MVE080/lib/python3.11/site-packages/IPython/core/formatters.py:711, in PlainTextFormatter.__call__(self, obj)
704 stream = StringIO()
705 printer = pretty.RepresentationPrinter(stream, self.verbose,
706 self.max_width, self.newline,
707 max_seq_length=self.max_seq_length,
708 singleton_pprinters=self.singleton_printers,
709 type_pprinters=self.type_printers,
710 deferred_pprinters=self.deferred_printers)
--> 711 printer.pretty(obj)
712 printer.flush()
713 return stream.getvalue()
File ~/anaconda3/envs/MVE080/lib/python3.11/site-packages/IPython/lib/pretty.py:419, in RepresentationPrinter.pretty(self, obj)
408 return meth(obj, self, cycle)
409 if (
410 cls is not object
411 # check if cls defines __repr__
(...)
417 and callable(_safe_getattr(cls, "__repr__", None))
418 ):
--> 419 return _repr_pprint(obj, self, cycle)
421 return _default_pprint(obj, self, cycle)
422 finally:
...
86 return (
---> 87 trans.dataspace_is_numerical and tname not in linear_transforms
88 )
AttributeError: 'identity_trans' object has no attribute 'dataspace_is_numerical'
У меня есть правильное решение этого упражнения, и оно по-прежнему выдает ту же ошибку!
Я использую vscode в Ubuntu, Python 3.11.10 и использую среда conda со следующими зависимостями:
Я пытаюсь создать гистограмму с помощью ggplot, вот мой код: [code]data = pd.read_csv('Weather_not_tidy.csv') data = data.rename(columns={'Temp2009': '2009', 'Temp2010': '2010'})
File ~/anaconda3/envs/MVE080/lib/python3.11/site-packages/IPython/lib/pretty.py:419, in RepresentationPrinter.pretty(self, obj) 408 return meth(obj, self, cycle) 409 if ( 410 cls is not object 411 # check if cls defines __repr__ (...) 417 and callable(_safe_getattr(cls, "__repr__", None)) 418 ): --> 419 return _repr_pprint(obj, self, cycle) 421 return _default_pprint(obj, self, cycle) 422 finally: ... 86 return ( ---> 87 trans.dataspace_is_numerical and tname not in linear_transforms 88 )
AttributeError: 'identity_trans' object has no attribute 'dataspace_is_numerical' [/code] У меня есть правильное решение этого упражнения, и оно по-прежнему выдает ту же ошибку! Я использую vscode в Ubuntu, Python 3.11.10 и использую среда conda со следующими зависимостями: [code]name: MVE080 dependencies: - python=3.11 - plotnine=0.12 - numpy=1.26 - pandas=2.1 - pip=23.1 - pip: - geopandas [/code] Я ожидал увидеть гистограмму с температурой от -10 до 10 по оси X и цифрой по оси Y! :(