0

Pardon me, I found similar post in stack overflow but nothing could able to resolve my issue. So duplicate post. I'm using jupyter lab, version 3.1.9. I need to convert pyspark data frame to pandas data frame.It was showing that I need to have Pandas >= 0.23.2 must be installed in order to use toPandas(). I had older version of pandas. So I wrote following code

!pip install wheel
!pip install pandas

I got this message

Requirement already satisfied: wheel in /opt/conda/lib/python3.9/site-packages (0.37.0)
Requirement already satisfied: pandas in /opt/conda/lib/python3.9/site-packages (1.3.2)
Requirement already satisfied: numpy>=1.17.3 in /opt/conda/lib/python3.9/site-packages (from pandas) (1.20.3)
Requirement already satisfied: python-dateutil>=2.7.3 in /opt/conda/lib/python3.9/site-packages (from pandas) (2.8.2)
Requirement already satisfied: pytz>=2017.3 in /opt/conda/lib/python3.9/site-packages (from pandas) (2021.1)
Requirement already satisfied: six>=1.5 in /opt/conda/lib/python3.9/site-packages (from python-dateutil>=2.7.3->pandas) (1.16.0)

But when I was trying to run following code to check pandas version

import pandas as pd
pd.__version__

I got error message

ModuleNotFoundError: No module named 'pandas'

Can you please help me to resolve the error?

JDoe
  • 349
  • 1
  • 4
  • 15
  • 1
    Did you also take this [question](https://stackoverflow.com/questions/40553560/jupyter-python3-notebook-cannot-recognize-pandas) into consideration? – Code_beginner Feb 11 '22 at 08:08

0 Answers0