Skip to content

Commit e820295

Browse files
authored
Merge pull request statsmodels#5977 from bashtage/fix-docbuild
MAINT: Cleanup legacy imports
2 parents 876dd47 + 4ff64af commit e820295

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+7
-69
lines changed

docs/source/gettingstarted.rst

Lines changed: 0 additions & 1 deletion

examples/incomplete/arima.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from __future__ import print_function
21
from statsmodels.datasets.macrodata import load_pandas
32
from statsmodels.tsa.base.datetools import dates_from_range
43
from statsmodels.tsa.arima_model import ARIMA

examples/incomplete/wls_extended.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
at outliers, compares with RLM and a short bootstrap
66
77
"""
8-
from __future__ import print_function
98
import numpy as np
109
import statsmodels.api as sm
1110
import matplotlib.pyplot as plt

examples/notebooks/contrasts.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
},
1616
"outputs": [],
1717
"source": [
18-
"from __future__ import print_function\n",
1918
"import numpy as np\n",
2019
"import statsmodels.api as sm"
2120
]

examples/notebooks/discrete_choice_example.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
"metadata": {},
3939
"outputs": [],
4040
"source": [
41-
"from __future__ import print_function\n",
4241
"import numpy as np\n",
4342
"import pandas as pd\n",
4443
"from scipy import stats\n",

examples/notebooks/discrete_choice_overview.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
},
1616
"outputs": [],
1717
"source": [
18-
"from __future__ import print_function\n",
1918
"import numpy as np\n",
2019
"import statsmodels.api as sm"
2120
]

examples/notebooks/formulas.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
},
2727
"outputs": [],
2828
"source": [
29-
"from __future__ import print_function\n",
3029
"import numpy as np # noqa:F401 needed in namespace for patsy\n",
3130
"import statsmodels.api as sm"
3231
]

examples/notebooks/generic_mle.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
},
3535
"outputs": [],
3636
"source": [
37-
"from __future__ import print_function\n",
3837
"import numpy as np\n",
3938
"from scipy import stats\n",
4039
"import statsmodels.api as sm\n",

examples/notebooks/glm.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"metadata": {},
2525
"outputs": [],
2626
"source": [
27-
"from __future__ import print_function\n",
2827
"import numpy as np\n",
2928
"import statsmodels.api as sm\n",
3029
"from scipy import stats\n",

examples/notebooks/glm_formula.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
},
2525
"outputs": [],
2626
"source": [
27-
"from __future__ import print_function\n",
2827
"import statsmodels.api as sm\n",
2928
"import statsmodels.formula.api as smf\n",
3029
"star98 = sm.datasets.star98.load_pandas().data\n",

examples/notebooks/gls.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
},
1616
"outputs": [],
1717
"source": [
18-
"from __future__ import print_function\n",
1918
"import statsmodels.api as sm\n"
2019
]
2120
},

examples/notebooks/interactions_anova.ipynb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@
3333
"metadata": {},
3434
"outputs": [],
3535
"source": [
36-
"from __future__ import print_function\n",
37-
"from statsmodels.compat import urlopen\n",
36+
"from urllib.request import urlopen\n",
3837
"import numpy as np\n",
3938
"np.set_printoptions(precision=4, suppress=True)\n",
4039
"\n",

examples/notebooks/ols.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"metadata": {},
2525
"outputs": [],
2626
"source": [
27-
"from __future__ import print_function\n",
2827
"import numpy as np\n",
2928
"import statsmodels.api as sm\n",
3029
"import matplotlib.pyplot as plt\n",

examples/notebooks/plots_boxplots.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
},
2323
"outputs": [],
2424
"source": [
25-
"from __future__ import print_function\n",
2625
"%matplotlib inline\n",
2726
"\n",
2827
"import numpy as np\n",

examples/notebooks/predict.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"metadata": {},
2525
"outputs": [],
2626
"source": [
27-
"from __future__ import print_function\n",
2827
"import numpy as np\n",
2928
"import statsmodels.api as sm"
3029
]

examples/notebooks/quantile_regression.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
"metadata": {},
4141
"outputs": [],
4242
"source": [
43-
"from __future__ import print_function\n",
4443
"import numpy as np\n",
4544
"import pandas as pd\n",
4645
"import statsmodels.api as sm\n",

examples/notebooks/regression_diagnostics.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
},
4343
"outputs": [],
4444
"source": [
45-
"from __future__ import print_function\n",
4645
"from statsmodels.compat import lzip\n",
4746
"\n",
4847
"import numpy as np\n",

examples/notebooks/regression_plots.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
},
2727
"outputs": [],
2828
"source": [
29-
"from __future__ import print_function\n",
3029
"from statsmodels.compat import lzip\n",
3130
"import numpy as np\n",
3231
"import matplotlib.pyplot as plt\n",

examples/notebooks/robust_models_0.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"metadata": {},
2525
"outputs": [],
2626
"source": [
27-
"from __future__ import print_function\n",
2827
"import numpy as np\n",
2928
"import statsmodels.api as sm\n",
3029
"import matplotlib.pyplot as plt\n",

examples/notebooks/robust_models_1.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
},
2727
"outputs": [],
2828
"source": [
29-
"from __future__ import print_function\n",
3029
"from statsmodels.compat import lmap\n",
3130
"import numpy as np\n",
3231
"from scipy import stats\n",

examples/notebooks/statespace_arma_0.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
},
3434
"outputs": [],
3535
"source": [
36-
"from __future__ import print_function\n",
3736
"import numpy as np\n",
3837
"from scipy import stats\n",
3938
"import pandas as pd\n",

examples/notebooks/tsa_arma_0.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"metadata": {},
2525
"outputs": [],
2626
"source": [
27-
"from __future__ import print_function\n",
2827
"import numpy as np\n",
2928
"from scipy import stats\n",
3029
"import pandas as pd\n",

examples/notebooks/tsa_arma_1.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"metadata": {},
2525
"outputs": [],
2626
"source": [
27-
"from __future__ import print_function\n",
2827
"import numpy as np\n",
2928
"import statsmodels.api as sm\n",
3029
"import pandas as pd\n",

examples/notebooks/tsa_dates.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
},
1616
"outputs": [],
1717
"source": [
18-
"from __future__ import print_function\n",
1918
"import statsmodels.api as sm\n",
2019
"import numpy as np\n",
2120
"import pandas as pd"

examples/notebooks/tsa_filters.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"metadata": {},
2525
"outputs": [],
2626
"source": [
27-
"from __future__ import print_function\n",
2827
"import pandas as pd\n",
2928
"import matplotlib.pyplot as plt\n",
3029
"\n",

examples/notebooks/wls.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"metadata": {},
2525
"outputs": [],
2626
"source": [
27-
"from __future__ import print_function\n",
2827
"import numpy as np\n",
2928
"from scipy import stats\n",
3029
"import statsmodels.api as sm\n",

examples/python/contrasts.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
# # Contrasts Overview
1111

12-
from __future__ import print_function
1312
import numpy as np
1413
import statsmodels.api as sm
1514

examples/python/discrete_choice_example.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
# A survey of women only was conducted in 1974 by *Redbook* asking about
1515
# extramarital affairs.
1616

17-
from __future__ import print_function
1817
import numpy as np
1918
import pandas as pd
2019
from scipy import stats

examples/python/discrete_choice_overview.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
# # Discrete Choice Models Overview
1111

12-
from __future__ import print_function
1312
import numpy as np
1413
import statsmodels.api as sm
1514

examples/python/formulas.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#
2121
# ## Loading modules and functions
2222

23-
from __future__ import print_function
2423
import numpy as np # noqa:F401 needed in namespace for patsy
2524
import statsmodels.api as sm
2625

examples/python/generic_mle.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
# ## Example 1: Probit model
2424

25-
from __future__ import print_function
2625
import numpy as np
2726
from scipy import stats
2827
import statsmodels.api as sm

examples/python/glm.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
# # Generalized Linear Models
1111

12-
from __future__ import print_function
1312
import numpy as np
1413
import statsmodels.api as sm
1514
from scipy import stats

examples/python/glm_formula.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
# To begin, we load the ``Star98`` dataset and we construct a formula and
1616
# pre-process the data:
1717

18-
from __future__ import print_function
1918
import statsmodels.api as sm
2019
import statsmodels.formula.api as smf
2120
star98 = sm.datasets.star98.load_pandas().data

examples/python/gls.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
# # Generalized Least Squares
1111

12-
from __future__ import print_function
1312
import statsmodels.api as sm
1413

1514
# The Longley dataset is a time series dataset:

examples/python/interactions_anova.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#
1515
# Download and format data:
1616

17-
from __future__ import print_function
1817
from statsmodels.compat import urlopen
1918
import numpy as np
2019
np.set_printoptions(precision=4, suppress=True)

examples/python/ols.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
# # Ordinary Least Squares
1111

12-
from __future__ import print_function
1312
import numpy as np
1413
import statsmodels.api as sm
1514
import matplotlib.pyplot as plt

examples/python/plots_boxplots.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
# The following illustrates some options for the boxplot in statsmodels.
1414
# These include `violin_plot` and `bean_plot`.
1515

16-
from __future__ import print_function
17-
1816
import numpy as np
1917
import matplotlib.pyplot as plt
2018
import statsmodels.api as sm

examples/python/predict.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
# # Prediction (out of sample)
1111

12-
from __future__ import print_function
1312
import numpy as np
1413
import statsmodels.api as sm
1514

examples/python/quantile_regression.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
# We first need to load some modules and to retrieve the data.
2626
# Conveniently, the Engel dataset is shipped with ``statsmodels``.
2727

28-
from __future__ import print_function
2928
import numpy as np
3029
import pandas as pd
3130
import statsmodels.api as sm

examples/python/regression_diagnostics.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
# ## Estimate a regression model
2525

26-
from __future__ import print_function
2726
from statsmodels.compat import lzip
2827

2928
import numpy as np

examples/python/regression_plots.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
# # Regression Plots
1111

12-
from __future__ import print_function
1312
from statsmodels.compat import lzip
1413
import numpy as np
1514
import matplotlib.pyplot as plt

examples/python/robust_models_0.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
# # Robust Linear Models
1111

12-
from __future__ import print_function
1312
import numpy as np
1413
import statsmodels.api as sm
1514
import matplotlib.pyplot as plt

examples/python/robust_models_1.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
# # M-Estimators for Robust Linear Modeling
1212

13-
from __future__ import print_function
1413
from statsmodels.compat import lmap
1514
import numpy as np
1615
from scipy import stats

examples/python/statespace_arma_0.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
# `statsmodels.tsa.statespace.SARIMAX` class rather than the
1414
# `statsmodels.tsa.ARMA` class.
1515

16-
from __future__ import print_function
1716
import numpy as np
1817
from scipy import stats
1918
import pandas as pd

examples/python/tsa_arma_0.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
# # Autoregressive Moving Average (ARMA): Sunspots data
1111

12-
from __future__ import print_function
1312
import numpy as np
1413
from scipy import stats
1514
import pandas as pd

examples/python/tsa_arma_1.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
# # Autoregressive Moving Average (ARMA): Artificial data
1111

12-
from __future__ import print_function
1312
import numpy as np
1413
import statsmodels.api as sm
1514
import pandas as pd

examples/python/tsa_dates.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
# # Dates in timeseries models
1111

12-
from __future__ import print_function
1312
import statsmodels.api as sm
1413
import numpy as np
1514
import pandas as pd

examples/python/tsa_filters.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
# # Time Series Filters
1111

12-
from __future__ import print_function
1312
import pandas as pd
1413
import matplotlib.pyplot as plt
1514

examples/python/wls.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
# # Weighted Least Squares
1111

12-
from __future__ import print_function
1312
import numpy as np
1413
from scipy import stats
1514
import statsmodels.api as sm

0 commit comments

Comments
 (0)