## Koala
## What is the library?
Python's pandas implemented for fast, type safe programming in Rust.
## Available Functions & Attributes
- CSV
### .read_csv(path: &str) -> CSV
returns CSV struct reading file from given path
```rust
let mut content = String::new();
let csv : CSV = dataframe::df::read_csv("test.csv", &mut content); ```
### .get_df() -> DataFrame
returns DataFrame from a CSV struct
```rust
let mut df = csv.get_df(); ```
- DataFrame
### .columns -> Vec<&str>
returns array of strings, containing column names
```rust
df.columns; ```
### .dataset -> Vec<Vec<&str>>
returns dataset matrix
```rust
df.dataset; ["richard", "25"]]
```
### .values -> Vec<Pair(&str, Vec<&str>)>
returns vector of pairs, containing column name, and all column values
```rust
df.values; ```
### .max(column: &str) -> f64
returns max from all values inside a column
```rust
df.max("age"); ```
### .max(column: &str) -> f64
return min from all values inside a column
```rust
df.min("age"); ```
### .mean(column: &str) -> f64
return mean from all values inside a column
```rust
df.mean("age"); ```
### .sum(column: &str) -> f64
returns sum of all non N/A values from column
```rust
df.sum("age"); ```
### [&str] -> Vec<&str>
string index for DataFrame, returns all values from a given column
```rust
df["age"]; ```
### [usize] -> Vec<&str>
usize index for DataFrame, returns given row with all columns
```rust
df[0]; ```
### .iloc(Vec<Range<usize>, Range<usize>>) -> Vec<Vec<&str>>
returns sliced dataset matrix from given range
```rust
df.iloc([0..2, 0..1].to_vec()); ```
### .is_na_col(column: &str) -> bool
returns if given column on DataFrame has a missing value
```rust
df.is_na_col("age"); ```
### .is_na() -> bool
returns matrix containing missing value bool for each value
```rust
df.is_na(); ```
### .push(value: Vec<&str>)
returns matrix containing missing value bool for each value
```rust
df.push(["ann", "20"]);
df.dataset; ```
### .pop(value: Vec<&str>) -> Vec<&str>
returns matrix containing missing value bool for each value
```rust
df.pop(); df.pop(); df.dataset; ```
### .n_uniques(column: &str) -> usize
returns matrix containing missing value bool for each value
```rust
df.n_uniques("age"); ```
### .uniques(column: &str) -> Vec<&str>
returns matrix containing missing value bool for each value
```rust
df.uniques("age"); ```
### .apply(column: &str, function: for<'r> fn(&'r str) -> &'a str)
applies closure function to each value on given column
```rust
fn in_my_twenties<'r>(age: &str) -> &'r str { "20" }
df.apply("age", in_my_twenties);
df.dataset; ```
### .fillna(column: &str, value: &str)
assigns given value to each N/A value on column
```rust
df.fillna("age", df.mean("age")); ```
### .dtypes -> HashMap<&str, &str>
returns type of each column
```rust
df.dtypes ```