Commit 87f0bd20 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

TEST: test hdf5 dropna export

parent 75b97c50
......@@ -150,14 +150,16 @@ def test_exportData_dropNaRows():
data[:, [2, 4, 7]] = np.nan
dtable = gen_DataTable(data)
exporting.exportData(dtable, 'data.tsv', 'tsv', dropNaRows=True)
exporting.exportData(dtable, 'data.tsv', 'tsv', dropNaRows=True)
exporting.exportData(dtable, 'data.h5', 'hdf5', dropNaRows=True)
got = pd.read_csv('data.tsv', sep='\t', index_col=0)
assert list(got.index) == [1, 2, 4, 6, 7, 9, 10]
got1 = pd.read_csv('data.tsv', sep='\t', index_col=0)
got2 = pd.read_hdf('data.h5')
exp = data[:, [0, 1, 3, 5, 6, 8, 9]].T
exp = data[:, [0, 1, 3, 5, 6, 8, 9]].T
assert np.all(np.isclose(exp, got.values))
for got in [got1, got2]:
assert list(got.index) == [1, 2, 4, 6, 7, 9, 10]
assert np.all(np.isclose(exp, got.values))
def test_defaultDateTimeFormat():
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment