當遇到no module named frontend的時候,需要安裝pymupdf,and specify its version number.
pip install PyMuPDF==1.16.14
不僅如此,Should be installed firstfitz,再安裝PyMuPDF.如果發生沖突,卸載掉PyMuPDF,And re-install according to the above statement.
Sometimes inaccessibility occurs、A case where the package cannot be downloaded,This is because the content is an extranet resource,just hang upVPN就行了.
<urlopen error [Errno 11004] getaddrinfo failed>
import numpy as np
import statsmodels.api as sm
import statsmodels.formula.api as smf
dat = sm.datasets.get_rdataset("Guerry", "HistData").data
When the category label is set,出現categoriesNo more hints,這是因為在新版本的pandasPrevious support has been removed in ,需要在pandas.api.types.CategoricalDtypeexplicitly declared in .
改之前:
df['class']=df['class'].astype("category",categories= ["n", "s", "k", "mm"],ordered=True)
改之後:
from pandas.api.types import CategoricalDtype
df['class']=df['class'].astype(CategoricalDtype(categories=['n', 's', 'k', 'mm'], ordered=True))
這是因為plotnineand already installed on the computermatplotlib沖突了,需要卸載掉matplotlib後重新安裝plotnine.
pip uninstall matplotlib
pip install plotnine