Free Book — Learn Python with Hockey
A hands-on, beginner-friendly guide to Python and data science — taught entirely through NHL data. Now completely free. Enter your email and I'll send you the book.
The book here was really, really well done.
This is amazingly awesome. I've recently slowly crept into data science driven by a pet passion for fantasy sport analytics. The way the learning is framed here is 10x what you'll get someplace else.
Fantastic... literally feels like it was written for me!
Much more engaging for me personally because it's info I'm interested in. I've taken automate the boring stuff, python for finance, etc and while those courses are great, I seem to be understanding it better because it's about a subject I like.
It helped me tremendously... I wouldn't be where I'm at with the Python language today without this book to kick start things.
All in the context of hockey, and designed so you can apply it to your own questions and do your own analysis.
The foundation of everything from data munging to web scraping to machine learning — plus the data library Pandas, statsmodels, scikit-learn, and visualization with seaborn.
Next time you find a site with data you'd like to analyze, you'll know how to pull it from a public API — or build a scraper to get it yourself if there isn't one.
Learn the difference between a regression and a random forest, and know when and how to build both.
Build your own database — for player stats, opponent tendencies, whatever you like — and use SQL to get data in and out of it.



Hi! My name is Nate and I'm a self-taught programmer and data scientist based in Milwaukee, WI. A few years ago I didn't know anything about Python, SQL, machine learning, or web scraping. So I taught myself — it took a few years and a lot of dead ends, but I figured it out. In this book I distill everything I learned into a step-by-step guide to doing hockey analytics and getting you up and running as quickly as possible.
107 notes from people who've worked through the books.
The book here was really, really well done.
This is amazingly awesome. I've recently slowly crept into data science driven by a pet passion for fantasy sport analytics. The way the learning is framed here is 10x what you'll get someplace else.
Probably the best / most complete Pandas walk through I've seen.
I really loved your book. You did an amazing job on it. I've been trying to get my son more into programming, and your book has been perfect — it really clicked for him.
Fantastic... literally feels like it was written for me!
I picked up more, and at a better pace, using this than a lot of the free online tools I'd been trying the past few months.
Love the book... My python has come a very long way thanks to you.
I have always wanted to learn a language but always seemed to get discouraged by the 'Hello World' chapters that were never ending. I like that your book cuts out the riff raff and teaches the important things! I'm flying through the book and feel like I'm learning a ton! Best wishes from a satisfied customer.
I have tons of coding books. Yours is a favorite.
Dear Nate, I'd like to thank you for a brilliant book. It's distilled, without extra and unnecessary info, and challenging at the same time. I'm writing you just to thank you.
Loving this so far!
Much more engaging for me personally because it's info I'm interested in. I've taken automate the boring stuff, python for finance, etc and while those courses are great, I seem to be understanding it better because it's about a subject I like.
Exactly the course I was looking for a long time! :)
I really like your approach to teaching data science! I usually work with R, and your book is one of the resources I'm using to teach myself Python. So far it's the best one!
The only Python course that's kept me engaged from beginning to end.
Been loving your book so far, it progresses at a great pace and has easily been the best mode I've used to understand coding. I'm excited to learn more, thank you for creating this book that's allowing me to have fun learning again, it's been ages.
Absolutely superb... definitely understand the acclamation.
Really helpful and a fun way to learn.
You're an absolute legend!
I am enjoying refreshing my Python knowledge with your book very much.
I am going through your book right now and I love it!
I bought LTCWFF and love it!
So helpful and enjoyable.
The book is great!
It helped me way more than my grad school class did.
Thank you Nathan... You ARE an amazing teacher!
Can I just say that this is the simplest and best explanation I have ever seen... Awesome!!
I was amazed by how you broke down complicated concepts and made them easier to understand.
I can't tell you how many times I've tried to get into programming and gave up because it was so dry. This has been such a nice change of pace and I'm loving it.
I just bought your book and have to say I enjoy it immensely so far.
Exactly what I needed to finally get past tutorial hell and apply Python to something I love.
It's been a great refresher for basic Python... I appreciate the Anki cards, they're helping cement the terminology.
It helped me tremendously... I wouldn't be where I'm at with the Python language today without this book to kick start things.
Very engaging so far compared to some of the other online resources I've tried to pick this up with.
I could not be more satisfied with the content. It has been great to work through your in-depth examples learning new skills. I had a previous interest in this sort of analysis and intermediate programming experience, but never could tie the two together.
Incredible work! Bought it right away. Only 3 chapters in and this book is already better than expected. Worth every penny. Thank you!
Recently bought Learn to Code with Baseball and am thoroughly enjoying it and learning some new things along the way.
It is really cool and I enjoy learning Python with it.
An excellent resource. I like your writing style and the projects are fun and make it easy to learn.
I've been greatly enjoying the content so far!
Love the book...
One of my friends started on his coding for fantasy football journey using your book and he loves it.
The book is very well structured and easy to follow... I found it very helpful!
Very informative and a good intro to coding. Additionally, Nate would answer any questions I emailed him within 24 hours. Excellent customer service and pushed new editions to everyone who had already paid. I really appreciate Nate's commitment to his product.
I spent a few minutes going through the charting examples... I really REALLY enjoyed it.
I've been fascinated by sports and statistics from a young age. Throughout my college career, no professor was able to get me excited about a subject matter like the first 20 pages of this book.
Loving it so far. I don't know if it's because I love basketball, how simple you make it to learn, your approach to teaching, or some combination — but it will probably be the reason I learn to code.
Your book is great. It's exactly what I needed to motivate me to push through.
Can definitely recommend it. It's so much easier learning coding with a subject that is familiar and one is passionate about. Thank you!
Very well put together. I've been needing a good excuse to strengthen my pandas and python skills and this looks like the perfect catalyst for me.
It's been a great intro into the world of analytics for me.
First, I'd just like to say how much I love the book and truly appreciate that something like this exists. I have been working through a variety of materials to build my Python skills and get more into the field, and this has been tremendously helpful.
I have purchased and started reading your book, it is amazing. I am a beginner in Python and your book is truly... fun.
The book is great! I've been looking for some learning materials for data analysis with the NBA and I'm really enjoying it so far.
The course is going well. I like how you bring out patterns in the commands. Makes it so much easier.
Gotta say, this is the most brilliant idea. Congrats on the absolutely awesome product.
I really loved it!
P.S. Huge fan of the books! Such a great and engaging way to practice analytics with a variety of methods on fun subject matters!
I'm flying through your book and loving every bit of it so far. The way you lay everything out is incredibly intuitive and easy to follow.
I wanted to take a moment to express my sincere gratitude for your book. I studied electrical and electronic engineering in university, and one area I really struggled with was coding. I made several attempts at courses in Python but struggled, failure becoming an all-too-familiar 'friend'. Your book has changed this! You have done a fantastic job and helped me tremendously in overcoming a challenge that's been weighing on me for over 15 years.
I have decided to buy the full book and I am actually having a lot of fun so far.
I'm working through your book and I'm only a couple of hours in but loving it so far!
Great stuff here — very well done!
I often refer back to your book since purchasing it.
I just finished reading and working through Learn to Code with Baseball... I enjoyed it immensely, learning a lot.
I recently purchased Tech Tools. I'm impressed by what I've read.
I'm brand new to coding. I used to be a stock broker and currently a personal trainer. Very excited to take a crack at this. I read your free chapters and felt like my brain could do well with data science. Thanks for opening a new door.
AWESOME BOOK!
Absolutely wonderful, genuinely surprised this exists.
I really am impressed with how simply you explained it, and how much clearer it made it for me to grasp the concept. I had come across your book somewhere on the internet and was a little curious, but now seeing how well you explain things, I am seriously considering purchasing it.
I have already been through the book once, so cheers to such awesome content and an excellent idea for learning Python. I'm going to figure out how to slice and dice the upcoming season!
Dude, this is awesome. Thank you again!
I bought this for my 18 year old who's playing junior hockey, looking for something to do in his spare time. He's having a good time going through the lessons and playing with hockey stats!
I happen to be finishing my Sports Management Degree and my final subject is on Data Analytics; I much prefer the learning style you created in the course.
Hi Nathan, I love the Learn to Code With Baseball book, I'm moving through it and enjoying it.
Thank you for combining two of my favorite things in life: 🏀 💻
Bought the soccer variation of your book a couple weeks ago, really enjoying it so far.
Your writing style and presentation has been really intuitive for me.
The idea is wonderful and I love it!
I am going through the first chapter now and I love how you've explained everything in a simple yet effective way.
I've been looking for things like this to learn code for a long time.
Blending my outside interests with my tech expertise never felt so fun. I used fantasycoding.com by Nathan Braun to analyze stats — a great way to learn more about scraping data and creating visualizations that matter with Python. Nathan was super great in guiding you through the process.
This is the first time I found a book to gradually introduce and explain the ideas!!! It seems that not only do you know the subject, but you have ways to teach it so it's understood and is pleasant and interesting!!!
I'm quite enjoying your book so far.
Thanks for putting together a cool project like this!
The book is great thus far.
Loving it so far!
This explanation was fascinating, thank you for continuing to share these!
Your ability to look at complex things and break them down into their simple parts in real time is rare.
I just want to thank you for creating this course — I have enjoyed every part of it. This is what learning is all about. Previous academic courses got me so disengaged... I loved this.
It's looking really great so far!
Loving it so far!
OMG this looks amazing 😊
Love the book!
Truly impressed.
Your book is incredible...
I'm learning a lot and I'm enjoying the book so far.
Thank you so much for this offering! I was wandering the proverbial forest trying to get going with advanced stats — I probably saved myself dozens of hours trying to piece this stuff together myself.
Thanks again for the fantastic book.
I am going through your book and find it very intuitive versus others.
I thought it was great! I really enjoyed the way you used soccer to teach programming concepts — it made the material much more engaging and relatable. I would highly recommend it to anyone interested in learning Python or programming in general. Thank you for writing such a great book!
My son is already over 100 pages into the book and loving the material!
Wonderful. He LOVED it! Best Xmas gift.
I bought your book quite some time ago but hadn't dug in until now. Wow. Nice work — I mean that. As a former teacher and once-upon-a-time coder, I really appreciate how you go about this.
Great book. If you make new books please let me know.
I went through your baseball book and it was FANTASTIC!!
I think the approach you're using is fantastic.
Enter your email and I'll send you a download link. No payment, no catch.