turicas / turicas/rows

Consistent data model

Open
#199 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.