8000 Remove SharedItems from test_excel by WillAyd · Pull Request #26579 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

Remove SharedItems from test_excel #26579

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Jun 5, 2019
Merged
Prev Previous commit
Next Next commit
Reverted changes to frame conftest
  • Loading branch information
WillAyd committed Jun 3, 2019
commit 4996340bb212b3b7473e78c5f2c599de37a6e47f
22 changes: 11 additions & 11 deletions pandas/tests/frame/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ def float_frame_with_na():

[30 rows x 4 columns]
"""
df = DataFrame(seriesd)
df = DataFrame(tm.getSeriesData())
# set some NAs
df.loc[5:10] = np.nan
df.loc[15:20, -2:] = np.nan
return df


@pytest.fixture
def bool_frame_with_na(seriesd):
def bool_frame_with_na():
"""
Fixture for DataFrame of booleans with index of unique strings

Expand All @@ -64,7 +64,7 @@ def bool_frame_with_na(seriesd):

[30 rows x 4 columns]
"""
df = DataFrame(seriesd) > 0
df = DataFrame(tm.getSeriesData()) > 0
df = df.astype(object)
# set some NAs
df.loc[5:10] = np.nan
Expand All @@ -73,7 +73,7 @@ def bool_frame_with_na(seriesd):


@pytest.fixture
def int_frame(seriesd):
def int_frame():
"""
Fixture for DataFrame of ints with index of unique strings

Expand All @@ -98,7 +98,7 @@ def int_frame(seriesd):

[30 rows x 4 columns]
"""
df = DataFrame({k: v.astype(int) for k, v in seriesd.items()})
df = DataFrame({k: v.astype(int) for k, v in tm.getSeriesData().items()})
# force these all to int64 to avoid platform testing issues
return DataFrame({c: s for c, s in df.items()}, dtype=np.int64)

Expand Down Expand Up @@ -133,7 +133,7 @@ def datetime_frame():


@pytest.fixture
def float_string_frame(seriesd):
def float_string_frame():
"""
Fixture for DataFrame of floats and strings with index of unique strings

Expand All @@ -158,13 +158,13 @@ def float_string_frame(seriesd):

[30 rows x 5 columns]
"""
df = DataFrame(seriesd)
df = DataFrame(tm.getSeriesData())
df['foo'] = 'bar'
return df


@pytest.fixture
def mixed_float_frame(seriesd):
def mixed_float_frame():
"""
Fixture for DataFrame of different float types with index of unique strings

Expand All @@ -189,7 +189,7 @@ def mixed_float_frame(seriesd):

[30 rows x 4 columns]
"""
df = DataFrame(seriesd)
df = DataFrame(tm.getSeriesData())
df.A = df.A.astype('float32')
df.B = df.B.astype('float32')
df.C = df.C.astype('float16')
Expand All @@ -198,7 +198,7 @@ def mixed_float_frame(seriesd):


@pytest.fixture
def mixed_int_frame(seriesd):
def mixed_int_frame():
"""
Fixture for DataFrame of different int types with index of unique strings

Expand All @@ -223,7 +223,7 @@ def mixed_int_frame(seriesd):

[30 rows x 4 columns]
"""
df = DataFrame({k: v.astype(int) for k, v in seriesd.items()})
df = DataFrame({k: v.astype(int) for k, v in tm.getSeriesData().items()})
df.A = df.A.astype('int32')
df.B = np.ones(len(df.B), dtype='uint64')
df.C = df.C.astype('uint8')
Expand Down
0