mirror of
https://github.com/nushell/nushell.git
synced 2024-11-22 16:33:37 +01:00
efc1cfa939
WIP This PR covers migration crates/nu-cmd-dataframes to a new plugin ./crates/nu_plugin_polars ## TODO List Other: - [X] Fix examples - [x] Fix Plugin Test Harness - [X] Move Cache to Mutex<BTreeMap> - [X] Logic for disabling/enabling plugin GC based off whether items are cached. - [x] NuExpression custom values - [X] Optimize caching (don't cache every object creation). - [x] Fix dataframe operations (in NuDataFrameCustomValue::operations) - [x] Added plugin_debug! macro that for checking an env variable POLARS_PLUGIN_DEBUG Fix duplicated commands: - [x] There are two polars median commands, one for lazy and one for expr.. there should only be one that works for both. I temporarily called on polars expr-median (inside expressions_macros.rs) - [x] polars quantile (lazy, and expr). the expr one is temporarily expr-median - [x] polars is-in (renamed one series-is-in) Commands: - [x] AppendDF - [x] CastDF - [X] ColumnsDF - [x] DataTypes - [x] Summary - [x] DropDF - [x] DropDuplicates - [x] DropNulls - [x] Dummies - [x] FilterWith - [X] FirstDF - [x] GetDF - [x] LastDF - [X] ListDF - [x] MeltDF - [X] OpenDataFrame - [x] QueryDf - [x] RenameDF - [x] SampleDF - [x] SchemaDF - [x] ShapeDF - [x] SliceDF - [x] TakeDF - [X] ToArrow - [x] ToAvro - [X] ToCSV - [X] ToDataFrame - [X] ToNu - [x] ToParquet - [x] ToJsonLines - [x] WithColumn - [x] ExprAlias - [x] ExprArgWhere - [x] ExprCol - [x] ExprConcatStr - [x] ExprCount - [x] ExprLit - [x] ExprWhen - [x] ExprOtherwise - [x] ExprQuantile - [x] ExprList - [x] ExprAggGroups - [x] ExprCount - [x] ExprIsIn - [x] ExprNot - [x] ExprMax - [x] ExprMin - [x] ExprSum - [x] ExprMean - [x] ExprMedian - [x] ExprStd - [x] ExprVar - [x] ExprDatePart - [X] LazyAggregate - [x] LazyCache - [X] LazyCollect - [x] LazyFetch - [x] LazyFillNA - [x] LazyFillNull - [x] LazyFilter - [x] LazyJoin - [x] LazyQuantile - [x] LazyMedian - [x] LazyReverse - [x] LazySelect - [x] LazySortBy - [x] ToLazyFrame - [x] ToLazyGroupBy - [x] LazyExplode - [x] LazyFlatten - [x] AllFalse - [x] AllTrue - [x] ArgMax - [x] ArgMin - [x] ArgSort - [x] ArgTrue - [x] ArgUnique - [x] AsDate - [x] AsDateTime - [x] Concatenate - [x] Contains - [x] Cumulative - [x] GetDay - [x] GetHour - [x] GetMinute - [x] GetMonth - [x] GetNanosecond - [x] GetOrdinal - [x] GetSecond - [x] GetWeek - [x] GetWeekDay - [x] GetYear - [x] IsDuplicated - [x] IsIn - [x] IsNotNull - [x] IsNull - [x] IsUnique - [x] NNull - [x] NUnique - [x] NotSeries - [x] Replace - [x] ReplaceAll - [x] Rolling - [x] SetSeries - [x] SetWithIndex - [x] Shift - [x] StrLengths - [x] StrSlice - [x] StrFTime - [x] ToLowerCase - [x] ToUpperCase - [x] Unique - [x] ValueCount --------- Co-authored-by: Jack Wright <jack.wright@disqo.com>
79 lines
1.9 KiB
TOML
79 lines
1.9 KiB
TOML
[package]
|
|
authors = ["The Nushell Project Developers"]
|
|
description = "Nushell dataframe plugin commands based on polars."
|
|
edition = "2021"
|
|
license = "MIT"
|
|
name = "nu_plugin_polars"
|
|
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-dataframe"
|
|
version = "0.92.2"
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
|
|
[[bin]]
|
|
name = "nu_plugin_polars"
|
|
bench = false
|
|
|
|
[lib]
|
|
bench = false
|
|
|
|
[dependencies]
|
|
nu-protocol = { path = "../nu-protocol", version = "0.92.2" }
|
|
nu-plugin = { path = "../nu-plugin", version = "0.92.2" }
|
|
|
|
# Potential dependencies for extras
|
|
chrono = { workspace = true, features = ["std", "unstable-locales"], default-features = false }
|
|
chrono-tz = "0.8"
|
|
fancy-regex = { workspace = true }
|
|
indexmap = { version = "2.2" }
|
|
num = {version = "0.4"}
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
sqlparser = { version = "0.43"}
|
|
polars-io = { version = "0.37", features = ["avro"]}
|
|
polars-arrow = { version = "0.37"}
|
|
polars-ops = { version = "0.37"}
|
|
polars-plan = { version = "0.37", features = ["regex"]}
|
|
polars-utils = { version = "0.37"}
|
|
typetag = "0.2"
|
|
uuid = { version = "1.7", features = ["v4", "serde"] }
|
|
|
|
[dependencies.polars]
|
|
features = [
|
|
"arg_where",
|
|
"checked_arithmetic",
|
|
"concat_str",
|
|
"cross_join",
|
|
"csv",
|
|
"cum_agg",
|
|
"default",
|
|
"dtype-categorical",
|
|
"dtype-datetime",
|
|
"dtype-struct",
|
|
"dtype-i8",
|
|
"dtype-i16",
|
|
"dtype-u8",
|
|
"dtype-u16",
|
|
"dynamic_group_by",
|
|
"ipc",
|
|
"is_in",
|
|
"json",
|
|
"lazy",
|
|
"object",
|
|
"parquet",
|
|
"random",
|
|
"rolling_window",
|
|
"rows",
|
|
"serde",
|
|
"serde-lazy",
|
|
"strings",
|
|
"to_dummies",
|
|
]
|
|
optional = false
|
|
version = "0.37"
|
|
|
|
[dev-dependencies]
|
|
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.92.2" }
|
|
nu-engine = { path = "../nu-engine", version = "0.92.2" }
|
|
nu-parser = { path = "../nu-parser", version = "0.92.2" }
|
|
nu-command = { path = "../nu-command", version = "0.92.2" }
|
|
nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.92.2" }
|