magpie ~dev
Data analysis / manipulation library for D
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
Magpie - Mir Data Analysis and Processing Library
DataFrame project for GSoC 2019.
The goal of the project is to deliver a DataFrame that behaves just like Pandas in Python.
Usage
import magpie.frame: DataFrame;
DataFrame!double df; // This declared a dataframe such that it contains homogeneous data of type double
df = [[1.2,2.4],[3.6, 4.8]];
assert(df.data == [1.2,2.4, 3.6, 4.8].sliced(2,2).universal); // Data is stored as a Universal 2D slice
df.display();
df.to_csv("./example.csv");
df.from_csv("./example.csv", 1, 1);
df.display();
Structure
- The DataFrame structure is defined as:
struct DataFrame(T)
{
Index frameIndex;
Slice!(T*, 2, Universal) data;
}
Functions
display()
Displays the content of the dataframe on the terminal.
to_csv(string path, bool writeIndex = true, bool writeColumn = true, char sep = ",")
Writes the DataFrame to CSV format.
- writeIndex - If set true writes row indexes to the file.
- writeColumn - If set rue writes column indexes to the file
- sep - Is the data seperator
from_csv(string path, int indexDepth = 1, int columnDepth = 1, char sep = ',')
(Experimental)
Parsing of CSV file into a DataFrame
- indexDepth - How many columns from left do row index span
- columnDepth - How many rows from top column index span
- sep - Data Seperator
- ~dev released 5 years ago
- Kriyszig/magpie
- proprietary
- Copyright © 2019, Norman
- Authors:
- Dependencies:
- mir-algorithm
- Versions:
-
0.1.0 2019-Jul-17 ~master 2019-Sep-13 ~pivot 2019-Sep-13 ~homogeneous 2019-Aug-25 ~filter 2019-Aug-26 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
38 downloads total
-
- Score:
- 1.4
- Short URL:
- magpie.dub.pm