forked from pandas-dev/pandas
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TST: split test_groupby.py (pandas-dev#20781)
closes pandas-dev#20696
- Loading branch information
Showing
13 changed files
with
5,983 additions
and
5,888 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import pytest | ||
import numpy as np | ||
from pandas import MultiIndex, DataFrame | ||
from pandas.util import testing as tm | ||
|
||
|
||
@pytest.fixture | ||
def mframe(): | ||
index = MultiIndex(levels=[['foo', 'bar', 'baz', 'qux'], ['one', 'two', | ||
'three']], | ||
labels=[[0, 0, 0, 1, 1, 2, 2, 3, 3, 3], | ||
[0, 1, 2, 0, 1, 1, 2, 0, 1, 2]], | ||
names=['first', 'second']) | ||
return DataFrame(np.random.randn(10, 3), index=index, | ||
columns=['A', 'B', 'C']) | ||
|
||
|
||
@pytest.fixture | ||
def df(): | ||
return DataFrame( | ||
{'A': ['foo', 'bar', 'foo', 'bar', 'foo', 'bar', 'foo', 'foo'], | ||
'B': ['one', 'one', 'two', 'three', 'two', 'two', 'one', 'three'], | ||
'C': np.random.randn(8), | ||
'D': np.random.randn(8)}) | ||
|
||
|
||
@pytest.fixture | ||
def ts(): | ||
return tm.makeTimeSeries() | ||
|
||
|
||
@pytest.fixture | ||
def seriesd(): | ||
return tm.getSeriesData() | ||
|
||
|
||
@pytest.fixture | ||
def tsd(): | ||
return tm.getTimeSeriesData() | ||
|
||
|
||
@pytest.fixture | ||
def frame(seriesd): | ||
return DataFrame(seriesd) | ||
|
||
|
||
@pytest.fixture | ||
def tsframe(tsd): | ||
return DataFrame(tsd) | ||
|
||
|
||
@pytest.fixture | ||
def df_mixed_floats(): | ||
return DataFrame({'A': ['foo', 'bar', 'foo', 'bar', | ||
'foo', 'bar', 'foo', 'foo'], | ||
'B': ['one', 'one', 'two', 'three', | ||
'two', 'two', 'one', 'three'], | ||
'C': np.random.randn(8), | ||
'D': np.array( | ||
np.random.randn(8), dtype='float32')}) | ||
|
||
|
||
@pytest.fixture | ||
def three_group(): | ||
return DataFrame({'A': ['foo', 'foo', 'foo', | ||
'foo', 'bar', 'bar', | ||
'bar', 'bar', | ||
'foo', 'foo', 'foo'], | ||
'B': ['one', 'one', 'one', | ||
'two', 'one', 'one', 'one', 'two', | ||
'two', 'two', 'one'], | ||
'C': ['dull', 'dull', 'shiny', | ||
'dull', 'dull', 'shiny', 'shiny', | ||
'dull', 'shiny', 'shiny', 'shiny'], | ||
'D': np.random.randn(11), | ||
'E': np.random.randn(11), | ||
'F': np.random.randn(11)}) |
Oops, something went wrong.