Practical Business Python
pbpython.com · Personal blog · on HN since 2014
Chris Moffitt writes Python tutorials for business users, covering pandas, Excel, visualization and report generation.
What HN saysHN commenters praise the material as clear and approachable, use it for teaching Python, and cite its PDF report and pandas HTML table guides.
33HN people shared it
6linked it in comments
58stories submitted
784story points
3 years agolast shared
2014people per year2026
Most-shared posts
- 1Effectively Using Matplotlib5 people · 524 points · first shared 2017 · 76 comments on HN
- 2Pandas Pivot Table Explained4 people · 164 points · first shared 2014 · 11 comments on HN
- 3Exploring an Alternative to Notebooks for Python Development3 people · 7 points · first shared 2020 · discussion on HN
- 4Creating PDF Reports with Pandas,Jinja,WeasyPrint3 people · 4 points · first shared 2015 · 1 comments on HN
- 5Overview of Python Visualization Tools3 people · 3 points · first shared 2015 · discussion on HN
- 6Reading Poorly Structured Excel Files with Pandas – Practical Business Python2 people · 8 points · first shared 2020 · discussion on HN
- 7Forecasting Website Traffic Using Facebook’s Prophet Library – PBPython2 people · 6 points · first shared 2017 · discussion on HN
- 8Evangelizing Python for Business – Practical Business Python2 people · 5 points · first shared 2019 · discussion on HN
- 9Practical Business Python2 people · 5 points · first shared 2016 · discussion on HN
- 10Efficiently Cleaning Text with Pandas2 people · 4 points · first shared 2021 · discussion on HN
- 11Comprehensive Guide to Grouping and Aggregating with Pandas (2020)2 people · 4 points · first shared 2020 · discussion on HN
- 12Interactive Data Analysis with Python and Excel – Practical Business Python2 people · 4 points · first shared 2016 · discussion on HN
- 13Overview of Pandas Data Types2 people · 2 points · first shared 2018 · discussion on HN
- 14Generating Excel Reports from a Pandas Pivot Table2 people · 1 points · first shared 2015 · 1 comments on HN
- 15Reading HTML Tables with Pandas2 people · 1 points · first shared 2020 · discussion on HN
What HN people wrote when they linked it
Notre1 · 2016-04-19
You can easily export any pandas DataFrame to html using the to_html() method. To generate full webpage, you'll probably want a templating engine like Jinja2.
The best demo I've seen for generating a PDF report is on Practical Business Python[1]
Edit: I forgot to mention the new pandas Style[1] feature for generating some impressive looking html tables.
[1] http://pbpython.com/pdf-reports.html
[2] http://pandas.pydata.org/pandas-docs/stable/style.html
ChrisRackauckas · 2023-05-17
Indeed DataFrames.jl isn't and won't be the fastest way to do many things. It makes a lot of trade offs in performance for flexibility. The columns of the dataframe can be any indexable array, so while most examples use 64-bit floating point numbers, strings, and categorical arrays, the nice thing about DataFrames.jl is that using arbitrary precision floats, pointers to binaries, etc. are all fine inside of a DataFrame without any modification. This is compared to things like the Pandas allowed datatypes (https://pbpython.com/pandas_dtypes.html). I'm quite impressed by the DataFrames.jl developers given how they've kept it dynamic yet seem to have achieved pretty good performance. Most of it is smart use of function barriers to avoid the dynamism in the core algorithms. But from that knowledge it's very clear that systems should be able to exist that outperform it even with the same algorithms, in some cases just by tens of nanoseconds but in theory that bump is always there.
In the Julia world the one which optimizes to be fully non-dynamic is TypedTables (https://github.com/JuliaData/TypedTables.jl) where all column types are known at compile time, removing the dynamic dispatch overhead. But in Julia the minor performance gain of using TypedTables vs the major flexibility loss is the reason why you pretty much never hear about it. Probably not even worth mentioning but it's a fun tidbit.
> For what it's worth, data.table is my favourite to use and I believe it has the…
pen2l · 2022-06-12
Woah, didn't know about this, thanks for bringing it to my attention!
Found this article shows its use:
https://pbpython.com/pandas-html-table.html
pjmlp · 2019-01-08
So I talk about COM, and you move the goal posts about DirectX in particular, that only implements a subset of COM, which requires writing wrappers by hand, including in .NET, hence Managed DirectX, XNA and SharpDX projects.
Apparently you missed the news regarding PWAs in Windows and its support for native UWP. Again, WinJS got dropped, because it was tied to the Windows 8 programming model, which got improved on Windows 8.1, only to be replaced by UWP on Windows 10.
Win32 GDI actually has "we wish you were all using Win2D and DirectDraw" support on Windows 10.
Here are some examples of automating Excel with Python, http://pbpython.com/windows-com.html, hardly any different from using VBA.
stared · 2015-07-05
This guys has a lot of nice material, presented in a clear and approachable way (this week I was teaching Python and I was linking him a lot).
For example:
http://pbpython.com/visualization-tools-1.html
http://pbpython.com/web-scraping-mn-budget.html
mkesper · 2015-02-23
I also found the two previous articles quite interesting:
http://pbpython.com/pandas-pivot-table-explained.html
http://pbpython.com/pandas-pivot-report.html