Comments (2)
I'm love with this attrs lib! I'll try to take a chance on this feature sometime
from rows.
We can currently override the row class by changing Table.Row
attribute, like in this example:
import rows
class City:
# Could also be `class City(rows.BaseRow)` if a base class for `Row` is available
def __init__(self, state, city, inhabitants, area):
self.state = state
self.city = city
self.inhabitants = inhabitants
self.area = area
@property
def density(self):
return self.inhabitants / self.area
data = rows.import_from_csv('examples/data/brazilian-cities.csv')
data.Row = City
for row in data:
print(row.state, row.city, row.density)
from rows.
Related Issues (20)
- Support shapefiles (SHP and GeoJSON)
- Create Schema class
- Handle timezones more efficiently
- Error importing XHTML with encoding declaration
- [XLS] support file object
- Python 3.7.0 error on import rows HOT 2
- Make Row object pickable
- Feature request: add option to disable field type inferencing HOT 6
- pgimport enhancements
- Support feather file type
- After pip install, import immediately breaks in interpreter due to plugin error with sys.maxsize HOT 1
- Use psycopg2' cursor.copy_expert instead of psql's copy
- Should support on python 3.5 be dropped, as is no longer officially supported?
- Add documentation about slugifying process of field names
- [pgimport] Option to do not store values as NULL
- Python 3.10: cannot import name 'Iterator' from 'collections'
- NameError: name 'obj' is not defined
- pgexport should dump JSON/JSONB fields using JSON representation (not Python's)
- New release on pypi HOT 7
- [pgimport] Wrong imported bytes
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rows.