I'm looking for an answer to the following question for over 4 hours already. Most pages indicate string formatting methods. This is not what I want.
I want to set a parameter in IPython for thousands separators for integers and floats. The option should only affect how numbers are displayed in my interactive session. I want to set a parameter once. All solutions where I need to do some formatting for every new output do not cover my need at all. I do some exploratory data analysis and don't want to bother with number formatting for every line of code.
The format should be used with all integers and floats, including those stored in numpy arrays or pandas dataframes.
For those familiar with Mathematica I indicate how one would do this in Mathematica: go to preferences => appearance => numbers => formatting. There you can "enable automatic number formatting" and chose a "digit block separator".
Example: if I type "600 + 600" into my ipython session, I want the following output: 1'200 (where ' would be my thousands separator).
I use IPython consoles in Spyder and IPython notebooks. Thank you.