astrodbtoolkit / astrodbtoolkit/AstrodbKit
Add method to pivot results
- Dominant language
- Python
- Stars
- 12
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
In some situations, we may need to group results and shift values into individual columns.
The example that comes to mind is data sorted like this:
```
name parameter value
source1 C/O ratio 0.1
source1 velocity -2
source1 mass 10
source2 C/O ratio 0.2
source2 mass 1
```
While this is fine, the user may want instead a table of the form:
```
name C/O ratio velocity mass
source1 0.1 -2 10
source2 0.2 None 1
```
This can be done with some group by commands, but we may want to provide a method `.pivot` to handle this automatically for the user, with an option to pass along what column name should be the pivot.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.