-
Notifications
You must be signed in to change notification settings - Fork 955
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #907 from marketneutral/master
Add datatable by h2oai
- Loading branch information
Showing
2 changed files
with
18 additions
and
0 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 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,17 @@ | ||
import unittest | ||
import datatable as dt | ||
from datatable.internal import frame_integrity_check | ||
from datatable import ltype | ||
|
||
class TestDatatable(unittest.TestCase): | ||
def test_fread(self): | ||
d0 = dt.fread( | ||
"L,T,U,D\n" | ||
"true,True,TRUE,1\n" | ||
"false,False,FALSE,0\n" | ||
",,,\n" | ||
) | ||
frame_integrity_check(d0) | ||
assert d0.shape == (3, 4) | ||
assert d0.ltypes == (ltype.bool,) * 4 | ||
assert d0.to_list() == [[True, False, None]] * 4 |