Created
March 12, 2022 18:46
-
-
Save sguzman/1d991ccbe18410771de7ad049e407d9d to your computer and use it in GitHub Desktop.
Parse out read books from good read dumps and sort by read date
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
With[{ | |
csv = Import[ | |
"C:\\Users\\Salvador \ | |
Guzman\\Documents\\goodeads-dump\\goodreads_library_export.csv", | |
"CSV" | |
], | |
data = {2, 3, 12, 15} | |
}, | |
With[{ | |
headers = First@csv | |
}, | |
Prepend[ | |
ReverseSortBy[ | |
Table[row[[data]], {row, | |
Cases[csv, | |
List[ | |
Repeated[Blank[], 18], | |
"read", | |
BlankNullSequence[] | |
]]}], Last], headers[[data]]]]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment