Найти - Пользователи
Полная версия: изучение pandas
Начало » Python для новичков » изучение pandas
1
Areostar
устанавливаю пакет
 pip install pandas

создаю и запускаю скрипт

 mport pip
installed_packages = pip.get_installed_distributions()
installed_packages_list = sorted(["%s==%s" % (i.key, i.version)
     for i in installed_packages])
print(installed_packages_list)

получаю ответ

тоесть установилось

запускаю
 import pandas as pd
pd.test()

но получаю:

 Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/pandas/util/_tester.py", line 12, in test
    import pytest

что я не так делаю?
Areostar
Traceback (most recent call last):
File “/usr/lib64/python3.6/site-packages/pandas/util/_tester.py”, line 12, in test
import pytest
ModuleNotFoundError: No module named ‘pytest’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “pandas_test.py”, line 3, in <module>
pd.test()
File “/usr/lib64/python3.6/site-packages/pandas/util/_tester.py”, line 14, in test
raise ImportError(“Need pytest>=3.0 to run tests”)
ImportError: Need pytest>=3.0 to run tests
Romissevd
 ModuleNotFoundError: No module named pytest
Не установлен pytest
 pip install -U pytest
Areostar
Спасибо Помогло!

Но теперь когда запускаю тест то получаю

running: pytest –skip-slow –skip-network /usr/lib64/python3.6/site-packages/pandas
================================================ test session starts =================================================
platform linux – Python 3.6.5, pytest-4.0.1, py-1.7.0, pluggy-0.8.0
rootdir: /usr/lib64/python3.6/site-packages/pandas, inifile:
collected 25451 items / 6 errors / 6 skipped

======================================================= ERRORS =======================================================
__________________________________ ERROR collecting tests/groupby/test_whitelist.py __________________________________
/usr/lib64/python3.6/site-packages/pandas/tests/groupby/test_whitelist.py:127: in <module>
“obj, whitelist”, zip((df_letters(), df_letters().floats),
E _pytest.warning_types.RemovedInPytest4Warning: Fixture “df_letters” called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.

и дальше описание ошибок!

Это значит что пандас установлен не правельно??
Areostar
или ещё что доставить надо?
Romissevd
Насколько я понял, это предупреждение о том что в дальнейших версиях эта функция будет недоступна. Но я могу ошибаться…
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB