DataFrame class
The main dataframe class
Constructors
Properties
-
columns
→ List<
DataFrameColumn> -
The dataframe columns
no setter
-
columnsIndices
→ List<
String> -
The dataframe columns indices
no setter
-
columnsNames
→ List<
String> -
The dataframe columns names
no setter
-
dataset
↔ List<
List< Object?> > -
An iterable of rows of data where each row is a list containing null
values for any unspecified columns.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- length → int
-
Number of rows og the data
no setter
-
rows
→ Iterable<
Map< String, Object> > -
An iterable of rows data
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addRecords(
List< Object> records) → void - Add a line of records to the data
-
addRow(
Map< String, Object> row) → void - Add a row to the data
-
colRecords<
T> (String colName, {int? offset, int? limit}) → List< T?> - Get typed records for a column
-
cols(
) → void - Print columns info
-
columnIndex(
String colName) → int - Get the index of a column
-
copy_(
) → DataFrame - Get a copy of a dataframe
-
countMissingData_(
{List< Object?> nullValues = const [null, 'null', 'nan', 'NULL', 'N/A']}) → DataFrame - Count missing data in a table
-
countNulls_(
String colName, {List< Object?> nullValues = const [null, 'null', 'nan', 'NULL', 'N/A']}) → int - Count null values
-
countZeros_(
String colName, {List< Object> zeroValues = const <Object>[0]}) → int - Count zero values
-
head(
[int lines = 5]) → void - Print sample data
-
limit(
int max, {int startIndex = 0}) → void - Limit the data
-
limit_(
int max, {int startIndex = 0}) → DataFrame - Get a new dataframe with limited data
-
max_(
String colName) → double - Get the max value of a column
-
mean_(
String colName, {required NullMeanBehavior nullAggregation}) → double - Mean of a column
-
min_(
String colName) → double - Get the min value of a column
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeFirstRow(
) → void - Remove the first row
-
removeLastRow(
) → void - Remove the last row
-
removeRowAt(
int index) → void - Remove a row at a given index position
-
setColumns(
List< DataFrameColumn> cols) → void - Set the dataframe columns
-
show(
[int lines = 5]) → void - Print info and sample data
-
sort(
String colName, {NullSortBehavior? nullBehavior, CompareFunction? compare}) → void - In-place sort this dataframe by a column.
-
sort_(
String colName, {NullSortBehavior? nullBehavior, CompareFunction? compare}) → DataFrame - Get a new dataframe sorted by a column.
-
subset(
int startIndex, int endIndex) → List< Map< String, Object> > - Limit the dataframe to a subset of data
-
subset_(
int startIndex, int endIndex) → DataFrame - Get a new dataframe with a subset of data
-
sum_(
String colName) → double - Sum of a column
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromCharStream(
Stream< String> charStream, {String? dateFormat, String? timestampCol, TimestampFormat timestampFormat = TimestampFormat.milliseconds, bool verbose = false}) → Future<DataFrame> - Build a dataframe from a utf8 encoded stream of comma separated characters.
-
fromCsv(
String path, {String? dateFormat, String? timestampCol, TimestampFormat timestampFormat = TimestampFormat.milliseconds, bool verbose = false}) → Future< DataFrame> - Build a dataframe from a csv file