synw / df Goto Github PK
View Code? Open in Web Editor NEWA dataframe for Dart
License: MIT License
A dataframe for Dart
License: MIT License
Currently all columns have nullable data types. If a user has data that explicitly should not be null, this makes their code more verbose (they have to add !
everywhere) and doesn't enforce non-null input.
To support non-nullable data types, we should add a non-nullable column and/or non-nullable DataFrame.
I can create a tmp file to prove that the asset is working, but the .fromCsv
function appears to break. What am I doing wrong here?
Future<void> loadUSZIPCodesCSV() async {
String path = 'assets/files/uszips.csv';
final file = File(path);
var existsSync = file.existsSync();
print('File path is actually: ${file.path} and ${existsSync}');
final df = await DataFrame.fromCsv(file.path,
dateFormat: "MMM dd yyyy", verbose: true);
df.show();
print(df.columns);
}
My log is:
I/flutter (24093): File path is actually: assets/files/uszips.csv and false
E/flutter (24093): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: Instance of 'FileNotFoundException'
E/flutter (24093): #0 DataFrame.fromCsv (package:df/src/df.dart:124:7)
The following code doesn't work on android. While the system prints 'exists' which means I'm using the correct path, the df package throws
[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Instance of 'FileNotFoundException'
The same code works on windows. Obviously has permission to read files as it prints 'exists' as well.
if (!File('downloaded/filters/merged/test.csv').existsSync()) {
print('exists');
}
final df = await DataFrame.fromCsv('downloaded/filters/merged/test.csv');
Google sheets and many other spreadsheet editing tools escape commas contained in cell values by wrapping the record in double quotes.
DF currently throws a Range Error if a row contains a record with a double quote escaped comma. DF should respect double quote escaping.
I need the feature to convert html table tag to dataframe like pandas one
Is there a way of converting a df to a csv file or some other way of saving it.
This library does not have any native dependencies and can be used across all platforms. Adding the web and desktop tags may help with exposure of this great library. Thanks for building this!
Expected behaviour:
df.drop('columnName')
df.dropna() //drops columns containing empty values
Add how to perform Python like action:
df = pd.DataFrame(csvPath)
filteredDf = df[df['price']=15]
As of now seems it is not possible to perform such action (Select {columns} Where {condition})
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.