I am a former professional poker player turned data scientist and an expert at programmatically exploring, analyzing, visualizing, and modeling data using Python. I am the author of Pandas Cookbook and founder of Dunder Data. - AMA

Ted Petrou
Dec 21, 2017

At the tail end of my undergraduate math degree, I began taking steps to become an actuary. I liked the systematic exam process and the near guarantee of career success.

But, as I transitioned into a Ph. D. program in statistics, online poker began to boom and measure theory in the classroom took a backseat to building player profile models at the tables.

I quit my formal education when I had just enough credits for a Master's degree. I played poker professionally for three years before burning out.

I then became an active member of society and taught high school math for 3 of the most difficult yet rewarding years of my life. 

An itch emerged to apply my math skills and I got a job as a data analyst and eventually as a data scientist after attending a 12-week immersive bootcamp.

While working as a data scientist, I received several weeks of professional training. I thought it was all very poorly put together and extremely overpriced. I began teaching data science on the side.

I  took a chance and started Dunder Data to help train the fundamentals of data science. My knowledge of one particular data science library in Python called Pandas grew very large. I became an expert at it and wrote Pandas Cookbook which was just released in October of 2017.

I built a Texas Hold'em heads-up limit poker bot. Try and beat it - www.gametheoryoptimalpoker.com

What is the Vibe of this AMA? What is AMA Vibe?

This AMA has finished, no more comments and questions can be posted and votes submitted to those. Check other similar AMAs here or host your own AMA!

Conversation (50)

In three easy steps and under a minute you could be hosting your own AMA. Join our passionate community of AMA hosts and schedule your own AMA today.

Let's get started!

How will you inspire those who are interested in the world of machine?

Dec 22, 4:25AM EST0

Have you tried your skills with Fantasy Sports?

Dec 21, 12:14PM EST0

No. I did play some fantasy sports about 20 years ago when results were mailed to my home. I have talked to some people who use their quantitative skills to give them an edge with paid fantasy sports sites like Fan Duel, but the margins look incredibly thin even if you are a better than average player.

Dec 21, 1:23PM EST0

Dats scientist or a professional poker player, which is more fun? ;)

Dec 21, 12:07PM EST0

In the long run, data science is more fun, because it has endless possibilities. Poker is just a single game, though a very important game that teaches you lots of real-life skills.

Dec 21, 1:24PM EST0

How about Chess?

Dec 21, 10:08PM EST0

What are some of the most surprising things you've learned from data when it comes to Poker?

Dec 21, 11:45AM EST0

The vast majority of people who play online lose money or barely make a profit. Only a small percentage of people can play sustainably indefinitely. It is very difficult to make it as a professional as it takes tremendous skill and emotional intelligence.

As for data on actual game play - there is a wide variety of types of poker players that we generally place into a few certain categories based on the distribution of actions they take. For instance, a "loose-aggressive" player will enter many pots and aggressively bet a much higher percentage of the time than a "tight-passive" player. There are many successful playing styles.

Dec 21, 12:01PM EST0

Tell us more about your Dunder Data.

Dec 21, 11:40AM EST0

Dunder Data is professional training company focusing on teaching the fundamentals of programmatically analyzing, visualizing, and exploring data. There are several courses that are available with our primary focus on teaching 'end-to-end' data analysis from ingestion to production.

Dec 21, 11:58AM EST0

What other areas besides poker intrest you when it comes to data? On another note, what do you think of all these big data/personal info hacks going on recently eg: Equifax?

Dec 21, 11:14AM EST0

There is an incredible amount of poor quality data in the real world. This poor quality data can be used to make completely incorrect conclusions about the world we live in. Small data errors lead to large misinterpretations - quite frequently. So its very important to understand, question, and scrutinize your data heavily before applying any more advanced analysis.

Re: big data hacks: Regardless of how secure you attempt to make your accounts, it's still likely at some point, some valuable information of yours will make it into the hands of someone with malicious intent.

In terms of data science, this actually can hamper lots of work, because IT security teams can make it difficult (and are rightfully paranoid) for data scientists to have access to the data.

Dec 21, 11:56AM EST0

Is online Poker legal for US citizens?

Dec 21, 11:00AM EST0

I don't follow poker anymore but, online poker was banned completely on "black friday", April 11, 2015 when the US Department of justice took over all poker sites. Since then, some states have legalized online poker. One of my friends who plays online poker says he plays with bitcoin now.

Dec 21, 11:49AM EST0

Do you think poker is a game of skills, luck, both?

Dec 21, 3:27AM EST0

Poker is both a game of skill and luck. There is a tremendous amount of variance in most forms of poker in the short run. But, the longer you play, the skill of the player will show more and more.

For instance, its impossible for a bad poker player to play over 1 million hands of poker and show a profit. On the other hand, this same player can show huge profits over 1,000 hands. 

Dec 21, 10:19AM EST0

Where did you learn about data science?

Dec 19, 11:18PM EST0

I began grad school in 2004 pursuing a degree in statistics, which would be the closest thing to what is called data science nowadays. I never heard the words "machine learning" as my degree focused on probability theory, math stats and applied regression. The first time I heard the words "data science" was in 2013 when I began taking online classes on coursera.

Dec 21, 10:22AM EST0

When did you create the poker bot?

Dec 19, 12:21PM EST0

My first version of my poker bot was built in 2005 in R as a statistics grad student. R was the language we used for everything. I wanted to build something on my own so I began to program a text version of heads-up poker.

I started working on it again in 2013 and wanted to make it accessible to everyone so naturally, the world wide web was a good place. I took some basic classes from codecademy on HTML/CSS and Javascript. I used some PHP in the backend to connect it the outcome of the hands to a database. It was a lot of fun and I made an android version of the game too. I wish I had more time to continue developing it.

Dec 21, 10:26AM EST0

How will you inspire undergraduate students to take the same steps you took?

Dec 19, 6:04AM EST0

I don't think I would like to inspire people to take the same steps as me. Everyone can carve their own path in life. I was fortunate that online poker allowed me to not join the corporate world at the end of my graduate degree. This gave me lots of freedom to travel and to escape the corporate world.

Dec 21, 10:29AM EST0

What is it with data science that interests you the most?

Dec 18, 2:15PM EST0

I really like investigating data sets without machine learning. The initial discovery phase is like being a detective attempting to put together a story that makes sense. And you have to put all the pieces together with reproducible code.

Dec 21, 10:37AM EST0

How did you come up with Dunder Data?

Dec 17, 8:32PM EST0

The name "Dunder Data" is a play on "dunder" methods in Python. Dunder is Python slang for "double underscore". Dunder methods in Python are also called "special methods" because they give the developer extra power. They are also called "magic methods". So Dunder Data translates to "magical data".

Dunder Data was founded because I had experienced poor corporate training at my last job as a data scientist and thought I could provide the market with a much better product.

Dec 21, 10:33AM EST0

Hello Ted. Good for you. You have achieved quite a lot at a  young age. But at some point why did you decide on being a professional poker player? 

Dec 23, 4:32AM EST0

Do you consider yourself successful at this point?

Dec 17, 8:39AM EST0

Yes, I have had a tremendous amount of opportunity in my life to do amazing things. I am very lucky and blessed to have had experienced it all. Now, my only real goal is to provide a similar experience for my children and wife.

Dec 21, 10:54AM EST0

Where can we download the poker bot application for mobile phones?

Dec 17, 7:54AM EST0

You can download the apk from my github repo. github.com/tdpetrou/GameTheoryOptimalPoker/tree/master/Android-App

It works but needs a lot more development.

Dec 21, 10:34AM EST0

Are you planning on writing more books anytime soon?

Dec 17, 3:52AM EST0

I am open-sourcing all my material, which will include more than 1,000 pages of pandas, matplotlib, and scikit-learn. This will not formally be a book but should read like one. You can find the material here - github.com/tdpetrou/Learn-Pandas

Dec 21, 10:35AM EST0

Have you received recognition for

Dec 17, 3:46AM EST0

How did poker affect your life?

Dec 17, 3:00AM EST0

Playing poker professionally was probably the best thing that ever happened to me. It was also close to the worst thing that happened to me. I learned how to take risk, evaluate ranges of possibilities, and to take advantage of my best opportunities.

I was unfortunately very undisciplined and would get very emotionally attached to winning and losing. I was unable to separate the emotions of the game from the logical decisions that had to be made.

I also spent many nights awake playing while angry and tired because I had lost a lot of money and had to win it back. It was extremely stressful and now I am grateful that I don't have to put myself through that torture anymore.

Dec 21, 10:42AM EST0

What else do you dream of becoming?

Dec 16, 9:11PM EST0

An olympic weightlifter. Olympic weightlifting is loads of fun. 

Dec 21, 10:48AM EST0

Do you have plans of enrolling again?

Dec 16, 8:51PM EST0

Enrolling in school? No. Definitely done with formal education.

Dec 21, 10:48AM EST0
About #TechAMA

Your source for anything and everything in the world of technology.  From cellphone reviews to the Oculus Rift. You won’t want to miss one AMA Event here!

Interested in participating? Our user-friendly channel makes it possible for anyone to create an AMA on just about any imaginable topic that’s relevant to technology--and you. Just click the button on top right called CreateAMA.

The #TechAMA channel is owned and operated by AMAfeed, LLC.