medialab / casanova Goto Github PK
View Code? Open in Web Editor NEWSpecialized & performant CSV readers, writers and enrichers for python.
License: MIT License
Specialized & performant CSV readers, writers and enrichers for python.
License: MIT License
Just something like this could do the trick
open_wrapper = gzip_open if f.endswith(".gz") else open
Taking inspiration from: https://github.com/Yomguithereal/mnemonist/blob/master/utils/merge.js#L255-L410 (no need for a fibonacci heap, the heapq
module from python should suffice here).
It has a cost so it should be False
by default. There are two different cases to handle (iterable of rows, iterable of strings).
This implies to relfect about addendum (one dict, two dict, one list, one dict) etc.
Verify if reader, writer and enricher work when a csv file has two columns with the same header name
casa = enricher(f, sys.stdout)
File "/home/boo/.pyenv/versions/quenouille/lib/python3.6/site-packages/casanova/enricher.py", line 75, in __init__
output_buffer_is_empty = is_empty_buffer(output_file)
File "/home/boo/.pyenv/versions/quenouille/lib/python3.6/site-packages/casanova/utils.py", line 63, in is_empty_buffer
return buf.tell() == 0
io.UnsupportedOperation: underlying stream is not seekable
With dummy tqdm file for instance.
Export the LazyLineDict as well as a method of the HeadersPositions wrap_as_
They only are iterables, while the documentation uses next
on them erroneously. Either change them to implement __next__
instead or edit the docs to reflect the actual state of those objects.
How could I forget that. I work with too much correctly formatted CSV files lately...
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.