This file contains 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
# 1. redo last command but as root | |
sudo !! | |
# 2. open an editor to run a command | |
ctrl+x+e | |
# 3. create a super fast ram disk | |
mkdir -p /mnt/ram | |
mount -t tmpfs tmpfs /mnt/ram -o size=8192M |
This file contains 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
df = pd.read_csv(WORKING_FOLDER + FILE, index_col=0) | |
# columns names = list(df.columns.values) | |
def prefix_every_row_with_column_name(column): | |
return column.name + " : " + column.astype(str) | |
df = df.apply(lambda column: prefix_every_row_with_column_name(column), axis=0) # axis=0 are the columns |