Advertisement
cd62131

pandas example

Dec 20th, 2017
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. #!/usr/bin/env python3
  2. import pandas as pd
  3. from pathlib import Path
  4. f = Path('C:/python/SUKKTN-PS.txt')
  5. d = pd.read_csv(f, sep=';', converters={'a': str})
  6. a = d.groupby('a')[['h', 'i', 'j', 'k']].sum()
  7. print(a.to_csv(sep=';'), end='')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement