Skip to content

Commit 1c2cd2c

Browse files
committed
Split test_excel.py (pandas-dev#24472)
1 parent 11ee17e commit 1c2cd2c

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

pandas/tests/io/excel/test_xlrd.py

+20
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from pandas.util.testing import ensure_clean
1515

1616
from pandas.io.excel import ExcelFile, read_excel
17+
from pandas.io.parsers import read_csv
1718

1819
_seriesd = tm.getSeriesData()
1920
_tsd = tm.getTimeSeriesData()
@@ -49,6 +50,25 @@ def setup_method(self, datapath):
4950
self.tsframe = _tsframe.copy()
5051
self.mixed_frame = _mixed_frame.copy()
5152

53+
def get_csv_refdf(self, basename):
54+
"""
55+
Obtain the reference data from read_csv with the Python engine.
56+
57+
Parameters
58+
----------
59+
60+
basename : str
61+
File base name, excluding file extension.
62+
63+
Returns
64+
-------
65+
66+
dfref : DataFrame
67+
"""
68+
pref = os.path.join(self.dirpath, basename + '.csv')
69+
dfref = read_csv(pref, index_col=0, parse_dates=True, engine='python')
70+
return dfref
71+
5272
def get_excelfile(self, basename, ext):
5373
"""
5474
Return test data ExcelFile instance.

0 commit comments

Comments
 (0)