Consistent data model
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 886
- Forks
- 137
- PR merge metrics
- No merged PRs in 30d
Description
I think the Table class should have some operations that return tables
Slicing:
cities = rows.import_from_csv("brazilian-cities.csv")
first_five = cities[:5]
Currently, rows returns a list of Row objects instead of a Table. However a table would be more consistent, since there are other operations that work with tables
Similarly, there could exist an easy way to create new Tables from existing rows of another tables.
For instance:
sc_cities = rows.Table(row for row in cities if row.state == 'SC')
assert isinstance(sc_cities, rows.Table)
It could also have a filter function:
sc_cities = cities.filter(lambda row: row.state == 'SC')
assert isinstance(sc_cities, rows.Table)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Table and Row implementations and existing operations that return tables. Compare the proposed slicing, construction from rows, and filter examples with current behavior, then check any existing tests for table operations. Done means these examples consistently produce Table instances with agreed semantics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100