data_frame library
A comprehensive data manipulation and analysis library for Dart.
This library provides powerful tools for working with structured data, including statistical analysis, mathematical operations, and data I/O.
Key Components
- Series: One-dimensional labeled data structure
- DataFrame: Two-dimensional labeled data structure
- DataIO: Input/output operations for CSV, JSON, and other formats
- MathOps: Mathematical operations and aggregations
- Statistics: Statistical analysis and hypothesis testing
Example Usage
import 'package:dart_pandas/dart_pandas.dart';
void main() async {
// Create a DataFrame
final df = DataFrame({
'name': ['Alice', 'Bob', 'Charlie'],
'age': [25, 30, 35],
'salary': [50000, 60000, 70000],
});
// Basic operations
print(df.head());
print(df.describe());
// Filtering
final adults = df.where((row) => row['age'] >= 30);
// Statistical analysis
final stats = Statistics.descriptiveStats(df['salary']);
print('Salary statistics: $stats');
// I/O operations
await DataIO.toCsv(df, 'output.csv');
final loaded = await DataIO.readCsv('output.csv');
}
Classes
- DataFrame
- A two-dimensional labeled data structure with columns of potentially different types. Provides powerful data manipulation, analysis, and transformation capabilities.
- DataIO
- Data input/output functions for reading and writing various formats.
- DataUtils
- Utility functions for creating sample data.
- DF
- Utility functions for creating and manipulating data structures
- MathOps
- Mathematical operations and aggregation functions for data analysis.
-
Series<
T> - A one-dimensional labeled array capable of holding any data type. Supports indexing, filtering, statistical operations, and transformations.
- Statistics
- Statistical analysis functions and tests.
Extensions
- DataFrameExtensions on DataFrame
- Extension methods for enhanced DataFrame functionality
- SeriesExtensions on Series
- Extension methods for Series
- SeriesMathOps on Series
- Extended mathematical operations for Series.