Pandas
- Removing first k rows
df = df.iloc[k:]will give the dataframe with first k rows removed. - Removing specific rows
df.drop([3,10], axis=0, inplace=True)will remove 3rd, 10th row. - Replacing values
df.at[i,"col_name"]=some_valueto change the ith row of column colname with value somevalue. - Generate LaTeX table directly
df.to_latex. - Comma separation for large numbers
df.style.format(thousands = ','). df['col1'].map(di)to change all values incol1based on the dictionarydi. Entries with no key will be mapped to NaNs.