👻 Check our latest review to choose the best laptop for Machine Learning engineers and Deep learning tasks!
How can one modify the format for the output from a groupby operation in pandas that produces scientific notation for very large numbers?
I know how to do string formatting in python but I"m at a loss when it comes to applying it here.
df1.groupby("dept")["data1"].sum()
dept
value1 1.192433e+08
value2 1.293066e+08
value3 1.077142e+08
This suppresses the scientific notation if I convert to string but now I"m just wondering how to string format and add decimals.
sum_sales_dept.astype(str)
👻 Read also: what is the best laptop for engineering students?
We hope this article has helped you to resolve the problem. Apart from Format / Suppress Scientific Notation from Python Pandas Aggregation Results, check other ast Python module-related topics.
Want to excel in Python? See our review of the best Python online courses 2023. If you are interested in Data Science, check also how to learn programming in R.
By the way, this material is also available in other languages:
- Italiano Format / Suppress Scientific Notation from Python Pandas Aggregation Results
- Deutsch Format / Suppress Scientific Notation from Python Pandas Aggregation Results
- Français Format / Suppress Scientific Notation from Python Pandas Aggregation Results
- Español Format / Suppress Scientific Notation from Python Pandas Aggregation Results
- Türk Format / Suppress Scientific Notation from Python Pandas Aggregation Results
- Русский Format / Suppress Scientific Notation from Python Pandas Aggregation Results
- Português Format / Suppress Scientific Notation from Python Pandas Aggregation Results
- Polski Format / Suppress Scientific Notation from Python Pandas Aggregation Results
- Nederlandse Format / Suppress Scientific Notation from Python Pandas Aggregation Results
- 中文 Format / Suppress Scientific Notation from Python Pandas Aggregation Results
- 한국어 Format / Suppress Scientific Notation from Python Pandas Aggregation Results
- 日本語 Format / Suppress Scientific Notation from Python Pandas Aggregation Results
- हिन्दी Format / Suppress Scientific Notation from Python Pandas Aggregation Results
Singapore | 2023-01-31
decimal Python module is always a bit confusing 😭 Format / Suppress Scientific Notation from Python Pandas Aggregation Results is not the only problem I encountered. Will get back tomorrow with feedback
Prague | 2023-01-31
StackOverflow is always a bit confusing 😭 Format / Suppress Scientific Notation from Python Pandas Aggregation Results is not the only problem I encountered. Checked yesterday, it works!
New York | 2023-01-31
string Python module is always a bit confusing 😭 Format / Suppress Scientific Notation from Python Pandas Aggregation Results is not the only problem I encountered. Will use it in my bachelor thesis