Skip to content

Commit

Permalink
readme and licence
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Jun 17, 2020
1 parent 97e49be commit 6a812f5
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 0 deletions.
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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.
69 changes: 69 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
```

0 comments on commit 6a812f5

Please sign in to comment.