Last active
April 13, 2020 14:29
-
-
Save yanyuechuixue/2c08bf14baf63d96224703dab75d30c0 to your computer and use it in GitHub Desktop.
Pandas, input string with asymmetric errors (asymmetric uncertainties) and output / export into LaTex table
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
```python | |
mass1_summary_data = pd.DataFrame() | |
append_dict={} | |
append_dict['Name'] = "Name" | |
append_dict[par_] = '$' + format(median, '0.2f') + "^{+" + format(plus, '0.2f') + "}" + "_{-" + format(minus, '0.2f') + "}" + '$' | |
mass1_summary_data=mass1_summary_data.append(append_dict,ignore_index=True) | |
print(summary_data.to_latex(escape=False,index=False,na_rep="$\\backslash$")) | |
``` | |
Note: | |
Require ```\usepackage{booktabs}``` in your LaTex document. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment