Skip to content

Commit 19de82d

Browse files
committed
Add note of bug when CSV doesn't have a header.
1 parent e925a38 commit 19de82d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Data/DataFrame/IO.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ readSeparated :: Char -> ReadOptions-> String -> IO DataFrame
5858
readSeparated c opts path = withFile path ReadMode $ \handle -> do
5959
columnNames <-if hasHeader opts
6060
then map C.strip . C.split c <$> C.hGetLine handle
61-
else return []
61+
else return [] -- TODO: this current doesn't work for a CSV file
62+
-- with no header. We can read a line and seek back.
6263
tmpFiles <- getTempFiles columnNames
6364
mkColumns c tmpFiles handle
6465
df <- foldM (\df (i, name) -> do

0 commit comments

Comments
 (0)