https://github.com/utdata/rwd-workbench
Tips and tricks to using https://app.workbenchdata.com
https://github.com/utdata/rwd-workbench
Last synced: 5 months ago
JSON representation
Tips and tricks to using https://app.workbenchdata.com
- Host: GitHub
- URL: https://github.com/utdata/rwd-workbench
- Owner: utdata
- Created: 2019-04-30T18:57:48.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-05-03T15:31:50.000Z (about 6 years ago)
- Last Synced: 2025-03-31T14:44:58.120Z (about 1 year ago)
- Homepage:
- Size: 7.46 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Notes about Data Workbench
Workbench is based on Python's [pandas](https://pandas.pydata.org/) module, which means you can leverage pandas to do things that Workbench can't do natively.
This is a collection of some of those things.
## How it works
- In Workbench, create a new step and choose the [Python](http://help.workbenchdata.com/en/articles/1484226-python-editor) module.
- Define a function called `process` that accepts the current data as `table` (which will be a `pd.DataFrame`) and return the same `table`. You can use the following packages:
- math
- pd ([Pandas](https://pandas.pydata.org/pandas-docs/stable/reference/index.html))
- np ([numpy](https://docs.scipy.org/doc/numpy/reference/routines.html))
```python
def process(table):
# Do your thing here
return table
```
Your pandas dataframe object is called `table`, so you can reference columns as `table['columnname']` or `table.columnname`.
## Examples
- [Reshaping using Pandas melt](reshape-melt.md)
- [Using zfill to fix IDs that start with zero](zfill.md)