packages feed

dataframe-csv 2.3.0.1 → 2.3.1.0

raw patch · 2 files changed

+14/−3 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ DataFrame.IO.CSV: decodeSeparatedStrict :: CsvBytesReader
+ DataFrame.IO.CSV: type CsvBytesReader = ReadOptions -> ByteString -> IO DataFrame

Files

dataframe-csv.cabal view
@@ -1,6 +1,6 @@ cabal-version:      3.4 name:               dataframe-csv-version:            2.3.0.1+version:            2.3.1.0 synopsis:           CSV reader and writer for the dataframe ecosystem. description:     @DataFrame.IO.CSV@ — strict single-pass CSV read/write (pure
src/DataFrame/IO/CSV.hs view
@@ -13,8 +13,10 @@     readSeparated,     readCsvWithSchema,     CsvReader,+    CsvBytesReader,     schemaReadOptions,     decodeSeparated,+    decodeSeparatedStrict,     fromCsv,     fromCsvBytes, @@ -68,6 +70,8 @@ -} type CsvReader = ReadOptions -> FilePath -> IO DataFrame +type CsvBytesReader = ReadOptions -> BS.ByteString -> IO DataFrame+ {- | Read options a scan derives from its 'Schema': the schema assigns the column types /and/ selects the columns, so a scan reads only what its schema names — the same contract as @scanParquet@.@@ -142,7 +146,7 @@     validateReadOptions opts     let stripUtf8Bom b = fromMaybe b (BS.stripPrefix "\xEF\xBB\xBF" b)     csvData <- stripUtf8Bom <$> BS.readFile path-    decodeCsvStrict opts csvData+    decodeSeparatedStrict opts csvData  {- | Decode in-memory CSV bytes into a dataframe. The result is fully forced. (Note: unlike 'readSeparated', no UTF-8 BOM is stripped.)@@ -154,7 +158,14 @@ @ -} decodeSeparated :: ReadOptions -> BL.ByteString -> IO DataFrame-decodeSeparated opts csvData = decodeCsvStrict opts (BL.toStrict csvData)+decodeSeparated opts csvData = decodeSeparatedStrict opts (BL.toStrict csvData)++{- | Decode a strict in-memory CSV buffer into a dataframe. The result is+fully forced. As with 'decodeSeparated', this function does not strip a UTF-8+BOM; callers reading the start of a file should strip it first.+-}+decodeSeparatedStrict :: CsvBytesReader+decodeSeparatedStrict = decodeCsvStrict  {- | Write a dataframe to a comma-separated file.