简体   繁体   中英

No module error found while importing pandas

I am trying to import panda in python script .

import pandas as pd
import numpy as np

But I am getting below error :

Error from Scripts is : Script failed to run: 
Error: [Traceback (most recent call last):
   
   File "<string>", line 2, in <module>
 ModuleNotFoundError: No module named 'pandas'
] (2604) (2603)

This python script I am using in Cortex XSOAR (demisto).

I have to sort values in columns in one table. Google results shows that have to use pandas.DataFrame.sort_values. Hence, using this.

Please help me on fixing error with pandas module import or suggest me if there is any other way I can sort table values based on 1 column ie integer values

Thanks in advance , NVP

Did you install pandas ?

py -m pip install pandas

I would suggest you to check where you installed pandas and use sys to append that path to your code.

For example:

import sys
sys.path.append(r'c:\users\NVP\appdata\local\programs\python\python39\lib\site-packages')

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM