series.py, cannot import series from pandas

MRAB python at mrabarnett.plus.com
Sat Nov 28 13:22:40 EST 2020


On 2020-11-28 15:59, A. M. Thomas [PETech MIET MBA] wrote:
> Kindly guide on how to solve this problem from Python3.9 with pycharm. See
> the below
> 
> 
> import numpy as np
> import pandas as pd
> from pandas import series
> object = series([5,10,15,20])
> print (object)
> 
> 
> C:\Users\THOMAS\AppData\Local\Programs\Python\Python39\python.exe
> C:/Users/THOMAS/PycharmProjects/Example2/series.py
> Traceback (most recent call last):
>    File "C:\Users\THOMAS\PycharmProjects\Example2\series.py", line 3, in
> <module>
>      from pandas import series
> ImportError: cannot import name 'series' from 'pandas'
> (C:\Users\THOMAS\AppData\Roaming\Python\Python39\site-packages\pandas\__init__.py)
> 
> Process finished with exit code 1
> 
A brief look at the documentation suggests that it should be "Series", 
not "series".


More information about the Python-list mailing list