Complete Dataframe MVP (#3373)

* Dataframe MVP

* Removed test csv file

* Dataframe MVP

* Removed test csv file

* New revision polars

* New revision polars

* csv file reader

* argument parser for file reader

* Parser from Row primitive

* Column conversion

* Added as f32 and f64

* Parsing row to dataframe

* Removed repeated push to vector

* Accept table values to create dataframe

* Removed default serde

* Dataframe to rows to show data

* Save name of file with dataframe

* Usage example

* Upgrade polars version

* Clippy changes

* Added print function with head and tail

* Move dataframe struct to folder

* Lock file after running tests and merge

* Optional feature for dataframe

* Removed dataframe from plugins

* Update primitive.rs

Co-authored-by: JT <jonathandturner@users.noreply.github.com>
This commit is contained in:
Fernando Herrera
2021-05-12 02:01:31 +01:00
committed by GitHub
parent e73491441a
commit c80a9585b0
25 changed files with 1474 additions and 448 deletions

View File

@ -17,3 +17,6 @@ nu-source = { path = "../nu-source", version = "0.31.0" }
indexmap = { version = "1.6.1", features = ["serde-1"] }
itertools = "0.10.0"
num-traits = "0.2.14"
[features]
dataframe = ["nu-protocol/dataframe"]

View File

@ -724,6 +724,10 @@ pub fn get_data<'value>(value: &'value Value, desc: &str) -> MaybeOwned<'value,
UntaggedValue::Block(_) | UntaggedValue::Table(_) | UntaggedValue::Error(_) => {
MaybeOwned::Owned(UntaggedValue::nothing().into_untagged_value())
}
#[cfg(feature = "dataframe")]
UntaggedValue::Dataframe(_) => {
MaybeOwned::Owned(UntaggedValue::nothing().into_untagged_value())
}
}
}