Skip to content

Instantly share code, notes, and snippets.

View AnneTheAgile's full-sized avatar

AnneTheAgile

  • Fan of http://www.CodeTriage.com
View GitHub Profile
# It is very easy to read a clean CSV with pandas.
In [2]: import pandas
In [3]: db = pandas.read_csv("/path/fn.csv")
In [7]: db
Out[7]:
<class 'pandas.core.frame.DataFrame'>
Int64Index: 528 entries, 0 to 527
The usual easy way of LibreOffice aka Excel translating a column by editing its contents.
Formulae;
=SUBSTITUTE(D2,"HDR ","",1) # Necessary
=FIND("HDR ",D1) # FYI
EX.:
# Format row; Label row, Data row
# Used 3 tabs here on gist to delimit
[out-as-str] [out-as-calc] [other-field] [input]
CategoryCalc CategoryCalc Concept Category0