1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//! BlackJack strives to be a full featured crate for general data processing.
//!
//! _Long term_ goal is to create a lightweight [Pandas](https://pandas.pydata.org/) equivalent
//! by and for the Rust community, but with slight differences in focus...
//!
//! The project strives for a few key principles. When any implementation decisions are to be made,
//! they are made with these principles in mind, and in this order:
//! 1. **Memory efficiency**
//! - Minimize memory use at every opportunity.
//! 2. **Usability**
//! - Strive for ergonomics; often done by modeling the `Pandas` API where possible.
//! 3. **Speedy**
//! - It comes naturally most times with Rust. :)
//!
//! Eventually, a Python wrapper: [Lumber-Jack](https://github.com/milesgranger/lumber-jack)
//! associated with this crate, but that time will come.
//!
//! # Example use:
//!
//! ```
//! use blackjack::prelude::*;
//!
//! // We have a dataframe, of course...
//! let mut df = DataFrame::new();
//!
//! // Make some series, of different types
//! let series_i32: Series<i32> = Series::arange(0, 5);
//! let mut series_f64: Series<f64> = Series::from_vec(vec![1.0, 2.0, 3.0, 4.0, 5.0]);
//!
//! // You can set a series name!
//! series_f64.set_name("my-series");
//!
//! // Or not...
//! assert_eq!(series_i32.name(), None);
//!
//! // And add them to the dataframe
//! df.add_column(series_f64).unwrap();
//! df.add_column(series_i32).unwrap();
//!
//! // And then get a reference to a Series
//! let series_f64_ref: &Series<f64> = df.get_column("my-series").unwrap();
//!
//! // and a lot more...
//! ```