Skip to content

Commit

Permalink
add documentation for unique df command
Browse files Browse the repository at this point in the history
  • Loading branch information
gschoeni committed Dec 12, 2022
1 parent 5f9cc1c commit d2de20c
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions DataFrames.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,23 +198,23 @@ shape: (5356, 6)
│ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │
│ str ┆ str ┆ f64 ┆ f64 ┆ f64 ┆ f64 │
╞═════════════════════════╪═══════╪════════╪════════╪═══════╪════════╡
│ images/000000000581.jpg ┆ dog ┆ 49.37 ┆ 67.79 ┆ 74.29 ┆ 116.08 │
│ images/000000000581.jpg ┆ dog ┆ 49.37 ┆ 67.79 ┆ 74.29 ┆ 216.08 │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┤
│ images/000000001360.jpg ┆ dog ┆ 101.56 ┆ 178.2 ┆ 35.22 ┆ 38.34
│ images/000000001360.jpg ┆ dog ┆ 101.56 ┆ 178.2 ┆ 35.22 ┆ 238.34 │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┤
│ images/000000362567.jpg ┆ dog ┆ 90.96 ┆ 36.65 ┆ 86.2 ┆ 185.08 │
│ images/000000362567.jpg ┆ dog ┆ 90.96 ┆ 36.65 ┆ 86.2 ┆ 285.08 │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┤
│ images/000000201969.jpg ┆ dog ┆ 167.24 ┆ 73.99 ┆ 37.0 ┆ 64.94
│ images/000000201969.jpg ┆ dog ┆ 167.24 ┆ 73.99 ┆ 37.0 ┆ 264.94 │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┤
│ ... ┆ ... ┆ ... ┆ ... ┆ ... ┆ ... │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┤
│ images/000000237419.jpg ┆ dog ┆ 49.64 ┆ 104.53 ┆ 31.31 ┆ 48.88
│ images/000000237419.jpg ┆ dog ┆ 49.64 ┆ 104.53 ┆ 31.31 ┆ 248.88 │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┤
│ images/000000314708.jpg ┆ dog ┆ 47.17 ┆ 138.18 ┆ 54.72 ┆ 59.55
│ images/000000314708.jpg ┆ dog ┆ 47.17 ┆ 138.18 ┆ 54.72 ┆ 359.55 │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┤
│ images/000000257301.jpg ┆ dog ┆ 84.85 ┆ 161.09 ┆ 33.1 ┆ 51.26
│ images/000000257301.jpg ┆ dog ┆ 84.85 ┆ 161.09 ┆ 33.1 ┆ 251.26 │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┤
│ images/000000130399.jpg ┆ dog ┆ 51.63 ┆ 157.14 ┆ 53.13 ┆ 29.75
│ images/000000130399.jpg ┆ dog ┆ 51.63 ┆ 157.14 ┆ 53.13 ┆ 229.75 │
└─────────────────────────┴───────┴────────┴────────┴───────┴────────┘
```

Expand Down Expand Up @@ -379,6 +379,15 @@ Here is a list of supported output aggregation functions:
* `head` first 5 values of group
* `tail` last 5 values of the group

## Unique

Oxen can efficiently compute all the unique values given a column name, or comma separated list of column names.

```
$ oxen df annotations/train.csv --unique "file"
$ oxen df annotations/train.csv -u "file,label"
```

## Sort

Sorting can be achieved with the `sort` flag. For example you may want to find the largest bounding boxes by sorting on the height column.
Expand Down

0 comments on commit d2de20c

Please sign in to comment.