I want to parse an excel file with pandas.
I have installed pandas with:
$ pip install pandas
file.py:
import pandas
...
But when i start the Plone client on fg:
$ ./client-debug fg
This line get me the error:
ModuleNotFoundError: No module named 'pandas'
Anybody know how to use pandas on Plone and help me?
Thank in advance.
jaroel
(Roel Bruggink)
2
Normally Plone installs are managed with buildout, not pip.
https://docs.plone.org/manage/installing/installing_addons.html#installing-add-ons-using-buildout should help you with installing pandas.
mtrebron
(Norbert )
3
I have a 5.2 install where pgeocode depends on pandas. This was done by simply adding it to my eggs section.
Plone
mr.developer
Pillow
pdf2image
pgeocode
and in a viewlet:
def get_location_info(self, postal_code):
""" returns a pandas.DataFrame object
see: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html
"""
nomi = pgeocode.Nominatim('de')
results = nomi.query_postal_code(postal_code).to_dict()
return results
espenmn
(Espen)
4
I think I got it working (locally) with ( I used plotly and numpy too, but they might require / depend on some of the same stuff):
install_requires=[
'plotly',
'pandas',
'numpy',
],