Skip to content

Commit a653598

Browse files
committed
DOC: Fix doc build
1 parent 59b0c1c commit a653598

File tree

5 files changed

+14
-2
lines changed

5 files changed

+14
-2
lines changed

docs/source/contingency_tables.rst

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ contingency table cell counts:
5050
import statsmodels.api as sm
5151
5252
df = sm.datasets.get_rdataset("Arthritis", "vcd").data
53+
df.fillna({"Improved":"None"}, inplace=True)
5354
5455
tab = pd.crosstab(df['Treatment'], df['Improved'])
5556
tab = tab.loc[:, ["None", "Some", "Marked"]]

docs/source/plots/stl_plot.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import numpy as np
12
import matplotlib.pyplot as plt
23
from pandas.plotting import register_matplotlib_converters
34

@@ -8,6 +9,6 @@
89
data = co2.load().data
910
data = data.resample('M').mean().ffill()
1011

11-
res = STL(data).fit()
12+
res = STL(np.squeeze(data)).fit()
1213
res.plot()
1314
plt.show()

docs/source/treatment.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11

22
.. module:: statsmodels.treatment
3-
.. currentmodule:: statsmodels.treatment
43
:synopsis: Treatment Effect
54

5+
.. currentmodule:: statsmodels.treatment
6+
7+
68

79
.. _othermod:
810

requirements-doc.txt

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Requirements for doc build, in addition to requirements.txt
22
sphinx>=5,<6
3+
# Avoid warnings which break Sphinx by pinning pandas
4+
pandas>=2.0,<2.1
35
sphinx-material
46
jupyter
57
notebook
@@ -14,3 +16,4 @@ theano-pymc; os_name != "nt"
1416
pymc3; os_name != "nt"
1517
arviz; os_name != "nt"
1618
jinja2==3.0.3
19+

statsmodels/datasets/danish_data/data.py

+5
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ def load():
6060

6161
def _get_data():
6262
data = du.load_csv(__file__, "data.csv")
63+
for i, val in enumerate(data.period):
64+
parts = val.split("Q")
65+
month = (int(parts[1]) - 1) * 3 + 1
66+
67+
data.loc[data.index[i], "period"] = f"{parts[0]}-{month:02d}-01"
6368
data["period"] = pd.to_datetime(data.period)
6469
return data.set_index("period").astype(float)
6570

0 commit comments

Comments
 (0)