Simplified table-type data normalization
Project description
Simplified table data normalization.
Basic Usage
Learn more by reading the documentation!
from sandpaper import SandPaper
paper = SandPaper('my-sandpaper')\
.strip( # strip whitespace from column comment
column_filter=r'comment'
)\
.translate_text({ # get group id from column group
r'^group_(\d+)$': '{0}'
}, column_filter=r'group')\
.translate_date({ # normalize date from column date
'%Y-%m-%d': '%c',
'%m-%d': '%c'
}, column_filter=r'date')
# apply sandpaper rules to all files matching the brace expanded glob given
paper.apply('/home/you/source.csv', '/home/you/target.csv')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sandpaper-0.0.5.tar.gz
(13.4 kB
view hashes)