dataframe v0.3.1 DataFrame

Functions to create and modify a Frame, a structure with a 2D table with information, indexes and columns

Summary

Functions

Returns a value located at the position indicated by an index name and column name

Returns a list of data, not a frame like object. with the values of a given column

Returns a Frame with the selected columns by name

Returns the cummulative sum

Returns a statistical description of the data in the frame

Experimental Returns a frame with the info for which fun returned true. Extremely greedy. Only elements, not rows/columns

Experimental Returns the rows that contains certain value in a column # TODO: rationalize all this slicing operations

Reads the information from a CSV file. By default the first row is assumed to be the column names

Creates a list of Dataframes grouped by one of the columns. A , B 1 , 2 1, 3 2, 4 group_by(A) [ A B 1 2 1 3, A B 2 4 ]

Returns the information at the top of the frame. Defaults to 5 lines

Returns a value located at the position indicated by an index position and column position

Returns a Frame with the selected columns by position

Returns a slice of the data in the frame. Parameters are any list of rows and columns

Generic method to return rows based on the position of the index

Returns the data in the frame. Parameters are any list of rows and columns with names or a ranges of names To get only rows or columns check the functions above

Creates a new Frame from a 2D table, It creates a numeric index and a numeric column array automatically

Creates a new Frame from a 2D table, and a column array. It creates a numeric index automatically

Creates a new Frame from a 2D table, an index and a column array

Creates a Frame from the textual output of a frame (allows copying data from webpages, etc.)

Generic method to return rows based on the value of the index

Sorts the data in the frame based on its index. By default the data is sorted in ascending order

Sorts the data in the frame based on a given column. By default the data is sorted in ascending order

Returns the information at the bottom of the frame. Defaults to 5 lines

Writes the information of the frame into a csv file. By default the column names are written also

DataFrame.to_list_of_maps DataFrame.new([[1,2],[3,4]], ["A", "B"])

[%{"A" => 1, "B" => 2}, %{"A" => 3, "B" => 4}]

Returns a Frame which data has been transposed

Functions

at(frame, index_name, column_name)

Returns a value located at the position indicated by an index name and column name.

column(frame, column_name)
column(DataFrame.Frame.t, String.t) :: list

Returns a list of data, not a frame like object. with the values of a given column

columns(frame, column_names)

Returns a Frame with the selected columns by name.

cumsum(frame)

Returns the cummulative sum

describe(frame)

Returns a statistical description of the data in the frame

filter(frame, fun)

Experimental Returns a frame with the info for which fun returned true. Extremely greedy. Only elements, not rows/columns

filter_rows(frame, expected_column_name, expected_value)

Experimental Returns the rows that contains certain value in a column # TODO: rationalize all this slicing operations

from_csv(filename)

Reads the information from a CSV file. By default the first row is assumed to be the column names.

group_by(frame, master_column)

Creates a list of Dataframes grouped by one of the columns. A , B 1 , 2 1, 3 2, 4 group_by(A) [ A B 1 2 1 3, A B 2 4 ]

head(frame, size \\ 5)

Returns the information at the top of the frame. Defaults to 5 lines.

iat(frame, index, column)
iat(DataFrame.Frame.t, integer, integer) :: any

Returns a value located at the position indicated by an index position and column position.

icolumns(frame, column_indexes)

Returns a Frame with the selected columns by position.

iloc(frame, row_index, column_index)
iloc(DataFrame.Frame.t, Range.t | [integer], Range.t | [integer]) :: DataFrame.Frame.t

Returns a slice of the data in the frame. Parameters are any list of rows and columns

irows(frame, row_indexes)

Generic method to return rows based on the position of the index

loc(frame, row_names, column_names)

Returns the data in the frame. Parameters are any list of rows and columns with names or a ranges of names To get only rows or columns check the functions above

new(values)

Creates a new Frame from a 2D table, It creates a numeric index and a numeric column array automatically.

new(values, columns)

Creates a new Frame from a 2D table, and a column array. It creates a numeric index automatically.

new(table, columns, index)
new(DataFrame.Table.table | list, list, list) :: DataFrame.Frame.t

Creates a new Frame from a 2D table, an index and a column array

parse(text)

Creates a Frame from the textual output of a frame (allows copying data from webpages, etc.)

plot(frame)
plot(DataFrame.Frame.t) :: :ok
rows(frame, row_names)

Generic method to return rows based on the value of the index

sort_index(frame, ascending \\ true)
sort_index(DataFrame.Frame.t, boolean) :: DataFrame.Frame.t

Sorts the data in the frame based on its index. By default the data is sorted in ascending order.

sort_values(frame, column_name, ascending \\ true)
sort_values(DataFrame.Frame.t, String.t, boolean) :: DataFrame.Frame.t

Sorts the data in the frame based on a given column. By default the data is sorted in ascending order.

tail(frame, the_size \\ 5)

Returns the information at the bottom of the frame. Defaults to 5 lines.

to_csv(frame, filename, header \\ true)

Writes the information of the frame into a csv file. By default the column names are written also

to_list_of_maps()

DataFrame.to_list_of_maps DataFrame.new([[1,2],[3,4]], ["A", "B"])

[%{"A" => 1, "B" => 2}, %{"A" => 3, "B" => 4}]

transpose(frame)

Returns a Frame which data has been transposed.