dataframe-operations 1.0.1.0 → 1.0.1.1
raw patch · 2 files changed
+14/−1 lines, 2 filesdep ~dataframe-corePVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
Dependency ranges changed: dataframe-core
API changes (from Hackage documentation)
+ DataFrame.Operations.Subset: selectRows :: [Int] -> DataFrame -> DataFrame
Files
dataframe-operations.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: dataframe-operations-version: 1.0.1.0+version: 1.0.1.1 synopsis: Column operations, expression DSL, and statistics for the dataframe ecosystem. description:
src/DataFrame/Operations/Subset.hs view
@@ -370,6 +370,19 @@ where ixs = V.ifoldl' (\acc' i c -> if f c then i : acc' else acc') [] (columns df) +{- | O(k * n) select rows by index++> selectRows [0, 2, 4] df+-}+selectRows :: [Int] -> DataFrame -> DataFrame+selectRows ixs df =+ df+ { columns = V.map (atIndicesStable ixs') (columns df)+ , dataframeDimensions = (VU.length ixs', snd (dataframeDimensions df))+ }+ where+ ixs' = VU.fromList ixs+ {- | O(n) inverse of select > exclude ["Name"] df