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
Q: How to paste tab-separated data into Google Sheets | |
Problem: Google sheets automatically parses CSV data into columns on paste. It doesn't work with TSV - cannot detect tab as a separator automatically, and I cannot figure out how to enter tab as a custom separator. | |
Solution: | |
1. Data -> Cleanup Data -> Trim whitespace. | |
2. Data -> Split text into columns -> Choose space as the separator |
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
# osx | |
/usr/bin/time -l `ls` | |
# linux | |
/usr/bin/time -v `ls` | |
# from here: https://stackoverflow.com/questions/774556/peak-memory-usage-of-a-linux-unix-process |
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
# got to handle both escaped and literal | |
df.replace(to_replace=[r"\\t|\\n|\\r", "\t|\n|\r"], value=["",""], regex=True, inplace=<INPLACE>) |