From 6a812f553c6790b58786464f70db115d8b80b1f0 Mon Sep 17 00:00:00 2001 From: ritchie46 Date: Wed, 17 Jun 2020 11:29:56 +0200 Subject: [PATCH] readme and licence --- LICENSE | 19 +++++++++++++++ README.md | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 LICENSE create mode 100644 README.md diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000000..9dbfcb834b96 --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2020 Ritchie Vink + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 000000000000..8ee55f4c3410 --- /dev/null +++ b/README.md @@ -0,0 +1,69 @@ +# Polars +--- + +## In memory DataFrames in Rust + +This is my mock up of DataFrames implemented in Rust, using Apache Arrow as backend. + +## WIP + +### Series +- [x] cast +- [x] take by index/ boolean mask +- [x] Rust iterators +- [x] append +- [x] aggregation: min, max, sum +- [x] arithmetic +- [x] comparison +- [ ] find +- [ ] sorting (can be done w/ iterators) + +### DataFrame +- [x] selection +- [x] join: inner, left +- [ ] group by +- [x] concat (horizontal) +- [x] read csv +- [ ] write csv +- [ ] write json +- [ ] read json +- [ ] sorting + +### Data types +- [x] null +- [x] boolean +- [x] u32 +- [x] i32 +- [x] i64 +- [x] f32 +- [x] f64 +- [x] utf-8 +- [ ] date +- [ ] timestamp + + +## Example + +```rust +let s0 = Series::init("days", [0, 1, 2, 3, 4].as_ref()); +let s1 = Series::init("temp", [22.1, 19.9, 7., 2., 3.].as_ref()); +let temp = DataFrame::new_from_columns(vec![s0, s1]).unwrap(); + +let s0 = Series::init("days", [1, 2].as_ref()); +let s1 = Series::init("rain", [0.1, 0.2].as_ref()); +let rain = DataFrame::new_from_columns(vec![s0, s1]).unwrap(); +let joined = temp.left_join(&rain, "days", "days"); +println!("{}", joined.unwrap()) +``` + +```text + days temp rain + i32 f64 f64 + --- --- --- + + 0 22.1 null + 1 19.9 0.1 + 2 7 0.2 + 3 2 null + 4 3 nul +```