Skip to content

Commit 786a83e

Browse files
committed
CLN: Remove unused imports
Remove unused imports in datasets
1 parent a1ba1a5 commit 786a83e

File tree

28 files changed

+47
-77
lines changed

28 files changed

+47
-77
lines changed

statsmodels/datasets/anes96/data.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
"""American National Election Survey 1996"""
2+
from numpy import log
3+
4+
from statsmodels.datasets import utils as du
25

36
__docformat__ = 'restructuredtext'
47

@@ -85,13 +88,6 @@
8588
logpopul - log(popul + .1)
8689
"""
8790

88-
from os.path import dirname, abspath
89-
90-
import pandas as pd
91-
from numpy import log
92-
93-
from statsmodels.datasets import utils as du
94-
9591

9692
def load_pandas():
9793
"""Load the anes96 data and returns a Dataset class.

statsmodels/datasets/cancer/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Breast Cancer Data"""
2+
from statsmodels.datasets import utils as du
23

34
__docformat__ = 'restructuredtext'
45

@@ -25,7 +26,6 @@
2526
population - The population of the county
2627
2728
"""
28-
from statsmodels.datasets import utils as du
2929

3030

3131
def load_pandas():

statsmodels/datasets/ccard/data.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Bill Greene's credit scoring data."""
2+
from statsmodels.datasets import utils as du
23

34
__docformat__ = 'restructuredtext'
45

@@ -25,7 +26,7 @@
2526
Variable name definitions - See Source for more information on the
2627
variables.
2728
"""
28-
from statsmodels.datasets import utils as du
29+
2930

3031
def load_pandas():
3132
"""Load the credit card data and returns a Dataset class.

statsmodels/datasets/china_smoking/data.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Smoking and lung cancer in eight cities in China."""
2+
from statsmodels.datasets import utils as du
23

34
__docformat__ = 'restructuredtext'
45

@@ -25,11 +26,6 @@
2526
smoking - yes or no, according to a person's smoking behavior
2627
lung_cancer - yes or no, according to a person's lung cancer status
2728
"""
28-
import os
29-
30-
import pandas as pd
31-
32-
from statsmodels.datasets import utils as du
3329

3430

3531
def load_pandas():

statsmodels/datasets/co2/data.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
#! /usr/bin/env python
2-
31
"""Mauna Loa Weekly Atmospheric CO2 Data"""
2+
import pandas as pd
3+
4+
from statsmodels.datasets import utils as du
5+
46

57
__docformat__ = 'restructuredtext'
68

@@ -37,9 +39,6 @@
3739
3840
The data returned by load_pandas contains the dates as the index.
3941
"""
40-
import pandas as pd
41-
42-
from statsmodels.datasets import utils as du
4342

4443

4544
def load_pandas():

statsmodels/datasets/committee/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""First 100 days of the US House of Representatives 1995"""
2+
from statsmodels.datasets import utils as du
23

34
__docformat__ = 'restructuredtext'
45

@@ -44,7 +45,6 @@
4445
Committee names are included as a variable in the data file though not
4546
returned by load.
4647
"""
47-
from statsmodels.datasets import utils as du
4848

4949

5050
def load_pandas():

statsmodels/datasets/copper/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""World Copper Prices 1951-1975 dataset."""
2+
from statsmodels.datasets import utils as du
23

34
__docformat__ = 'restructuredtext'
45

@@ -38,7 +39,6 @@
3839
3940
Years are included in the data file though not returned by load.
4041
"""
41-
from statsmodels.datasets import utils as du
4242

4343

4444
def _get_data():

statsmodels/datasets/cpunish/data.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""US Capital Punishment dataset."""
2+
from statsmodels.datasets import utils as du
23

34
__docformat__ = 'restructuredtext'
45

@@ -41,7 +42,7 @@
4142
4243
State names are included in the data file, though not returned by load.
4344
"""
44-
from statsmodels.datasets import utils as du
45+
4546

4647
def load_pandas():
4748
"""

statsmodels/datasets/elnino/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""El Nino dataset, 1950 - 2010"""
2+
from statsmodels.datasets import utils as du
23

34
__docformat__ = 'restructuredtext'
45

@@ -32,7 +33,6 @@
3233
TEMPERATURE - average sea surface temperature in degrees Celcius
3334
(12 columns, one per month).
3435
"""
35-
from statsmodels.datasets import utils as du
3636

3737

3838
def load_pandas():

statsmodels/datasets/engel/data.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#! /usr/bin/env python
2-
31
"""Name of dataset."""
2+
from statsmodels.datasets import utils as du
43

54
__docformat__ = 'restructuredtext'
65

@@ -30,7 +29,6 @@
3029
income - annual household income (Belgian francs)
3130
foodexp - annual household food expenditure (Belgian francs)
3231
"""
33-
from statsmodels.datasets import utils as du
3432

3533
def load(as_pandas=None):
3634
"""
@@ -57,4 +55,3 @@ def load_pandas():
5755

5856
def _get_data():
5957
return du.load_csv(__file__, 'engel.csv')
60-

0 commit comments

Comments
 (0)