image: thumbnail.jpg
Build Captivating Display Tables in Python With Great Tables | Real Python Podcast #214
š Links from the show: https://realpython.com/podcasts/rpp/214/
Michael and Richard discuss the design philosophy and history behind creating display tables. We dig into the grammar of tables, the background of the project, and an ingenious way to build a collection of examples for a library.
We briefly cover how Richard and Michael started contributing to open source. We also discuss practicing data skills with challenges and resources like Tidy Tuesday.
This episode is sponsored by Mailtrap.
Topics:
- 00:00:00 -- Introduction
- 00:02:00 -- Michael's background in open source
- 00:04:07 -- Rich's background in open source
- 00:05:27 -- Advice for someone starting out
- 00:08:55 -- What do you mean by the term "display" table
- 00:11:32 -- What components were missing from other tables?
- 00:13:31 -- Using examples to explain features
- 00:16:09 -- Why was there an absence of this functionality in Python?
- 00:19:35 -- A progressive approach and the grammar of tables
- 00:21:26 -- Sponsor: Mailtrap
- 00:22:01 -- The design philosophy of great tables
- 00:25:31 -- Nanoplots, spark lines, and column spanners
- 00:27:06 -- Building a gallery of examples
- 00:28:56 -- Heat mapping cells and automatically adjusting text color
- 00:32:54 -- Output formats for the tables
- 00:34:46 -- Building in accessibility
- 00:36:55 -- Dependencies
- 00:37:42 -- What is the common workflow?
- 00:41:39 -- Video Course Spotlight
- 00:43:15 -- Adding graphics
- 00:46:41 -- Using a table contest to get examples
- 00:49:47 -- quartodoc and documenting the project
- 00:55:00 -- Tidy Tuesday and data science community
- 01:00:29 -- What are you excited about in the world of Python?
- 01:03:46 -- What do you want to learn next?
- 01:08:05 -- How can people follow the work you do online?
- 01:09:57 -- Thanks and goodbye
š Links from the show: https://realpython.com/podcasts/rpp/214/
Transcript#
This transcript was generated automatically and may contain errors.
Welcome to the Real Python Podcast. This is Episode 214. Do you need help making data tables in Python look interesting and attractive? How can you create beautiful, display-ready tables as easy as charts and graphs in Python? This week on the show, we speak with Rich Ione and Michael Chow from Posit about the Great Tables Python Library. Michael and Rich discuss the design philosophy and history behind creating display tables. We dig into the grammar of tables, the background of the project, and an ingenious way to build a collection of examples for a library. We briefly cover how Rich and Michael started contributing to open source. And we also discuss practicing data skills with challenges and resources like Tidy Tuesday. This episode is sponsored by MailTrap, an email delivery platform that developers love.
Try for free at mailtrap.io. All right, let's get started.
The Real Python Podcast is a weekly conversation about using Python in the real world. My name is Christopher Bailey, your host. Each week, we feature interviews with experts in the community and discussions about the topics, articles, and courses found at realpython.com. After the podcast, join us and learn real-world Python skills with a community of experts at realpython.com.
I'm excited today to have a couple people from Posit come and visit me. We've been doing a few additional data science-focused things lately, and I'm excited to have Michael and Rich from Posit on the show today to talk about Great Tables. So, welcome to the show. Thank you. Yo, thanks for having us.
Getting started with open source
Yeah, awesome. So, one of the things I've been trying to do lately is talk a little bit about how people got not necessarily involved in programming, but maybe how they got involved in open source, creating projects like this. Maybe we can start with you, Michael. Do you have a background in open source before working on Great Tables?
Yeah, that's a great question. So, I guess it all started in grad school. So, I did a degree in cognitive psychology. So, I was using R a lot for research and Python a lot to do some neuroscience stuff. And I think that it sort of started me, like a lot of people, with interacting with a lot of open source. And then sort of as I went, I would say I built a lot of really bad open source tools that never really went somewhere. And then from there, I joined a company called Datacamp, where I was able to actually like kind of put the tools out that we were using. And then I think from there, working on some other tools for open source. So, I worked on a tool for data wrangling called Suba. And I think that's where it kind of like, I went from like fledgling open source stuff to more kind of serious. So, I think it sort of started at grad school, and then like crappy open source to more kind of reasonable-ish tools.
What were things that defined the change for you? Like, you felt like you graduated when you started doing Suba. What was different about it? I think open source really helped in the beginning. It was more like learning that I was like building open source stuff. And that let me kind of like show my friends and try out like putting things into the world. Yeah, yeah. Showing your work.
Yeah. But I think I needed more like professional experience with software engineering. And so it's kind of like over time, it just got a little bit better until I felt a little more kind of ready to put stuff out. But I think it started with like research and then interacting a lot with open source. And then just doing a bad job a lot until it kind of started to feel okay to share with people. Yeah, yeah. Get comfortable.
That sounds good. Yeah. Awesome. Rich, what is your background in open source? For me, it happened a bit after grad school. And it's wild. Like I started with R just because I heard R a lot. It was mentioned by people around me. He did this in R. She did it in R. Like, you should learn R. Okay, fine. I'll get to learning R. Okay. And then like it was great. I started using it for work just after grad school. I got a real job. It made things automatable. Things I had to do on the daily were just a bit easier. Now I developed some personal tooling. I was like, wow, I'm going to just release this stuff on GitHub and see where it goes. Nobody's going to care. But eventually, maybe some people cared. But I got into more general stuff after that instead of domain specific things. And then I started interacting with people. Then I super caught the open source bug. Yeah. After all that stuff was conspiring around me.
There were projects that were involved in that last section there where you felt like, I got the bug and I really want to be in there. Yeah. Yeah. When I sort of made more broad, useful things, then people started to interact and made PRs and a lot of communication going. It just felt good. And I just wanted to keep going with that. And so I did more of that. So it kind of snowballed from basic, timid, you know, personal projects to more generalized, accessible projects for everybody.
Yeah. Do you feel like, and this is maybe for both of you, do you feel like that's an optimal way to get into open source to do the thing of dabbling and trying to send out requests to different projects or building your own? Do you have suggestions for people as far as the kind of path that might be easier to, I don't necessarily easier, but a path in to open source?
Well, for me, it was pretty low pressure. It wasn't my actual job, so no one was telling me what to do. So it was like a personal thing. And so it felt leisurely in a weird way. And I thought that was great. Like there's no pressure, there's no work pressure to do this stuff. It's totally optional. So that did the trick for me. How about you, Michael?
Yeah. I mean, I think for getting started, it's just so valuable contributing through like issues or PRs, but I actually think just choosing an open source place and kind of trying to be useful in whatever way you feel most comfortable is really, it's good for everyone. Like the, I feel like when you stick around, open source people notice and are really happy.
And you get kind of like some practice and often guidance. Like we, we have a really great contributor right now and great tables, Jerry, who just like, he answers GitHub discussions and he responds to issues. And I feel like we're so team Jerry, like when Jerry opens PRs, like I want Jerry to be really successful because he's been so helpful. And I think that's a really nice way to get involved is even if you're just responding to issues or discussions, I think it really builds relationships with the maintainers so that when you want to do other things, like I would take time out of my day to do anything that would be useful to Jerry.
And you get kind of like some practice and often guidance. Like we, we have a really great contributor right now and great tables, Jerry, who just like, he answers GitHub discussions and he responds to issues. And I feel like we're so team Jerry, like when Jerry opens PRs, like I want Jerry to be really successful because he's been so helpful.
And I think that that's, that's the kind of exciting opportunity that open sources, you can kind of start with issues and through relationships move to even like mentorship and guidance and new stuff.
That's cool. Do you feel like it's helped your career also, like kind of, you know, finding positions and things like that? Like if there was an open spot, you, you, you say, Oh, maybe Jerry or, you know, something like that. Is that a common occurrence that you've seen? I've certainly seen it. Yeah.
And even my own sort of story is, is like that, like contributing open source leads to like, you know, eventually getting a position cause you get good enough and you get known enough to, to be in the running for, for a job.
But for others, yeah, I totally seen it where people just contribute and like they're in there, they're talking on social media as well. Well, that really helps a lot because you know, they're known. Yeah. Yeah, exactly. Yeah. Kind of build your profile.
Yeah. I do think it helps too, that if you're working on open source, yeah, you do kind of have to explain like, what did I do and why is it useful for people? And I think that if you're a software engineer and what you're building is more proprietary, you do almost have the same challenge for your career. Like you do need to explain to people, like what did I do and why was it useful, but it can be a lot harder to kind of talk about it. You kind of have to find creative ways to talk about it sometimes. So I think it helps having open source where it's just kind of laid out and you can point to it and kind of talk about it.
What is a display table?
Yeah, that's cool. Awesome. Well, I brought you here to talk about great tables. I had seen the project and I was like, this is super interesting. Like this idea that so many people focus on data visualizations as the primary way to communicate what's being created. But to me very often, the amount of information that you could present in a table is just like dramatic. And I think your examples just really show it off. And so maybe we can start with this. What do you mean by the term display table? Should I have a go at this? What do you think?
Oh yeah. Yeah, it's tough. It's tough. It's tough to choose a word, like a word before table, because tables can be a lot of things. But I think we stuck on display table because it's the sort of table you see published like in a journal or see sports analytics, like a standings table, for instance. Yeah. It's hard to get that across just from data table, something you manipulate. This is like a kind of thing for presentation. Yeah. And it's different than other types of tables you might see on my pages in that it doesn't have like hundreds or thousands of rows you just page through. And it's also not like a raw data frame, like as in a console. Yeah. So yeah, it's tough. There's not really great names for this sort of thing, but we went display table. It sort of fits and gets a point across. It's basically something you want to gussy up and show people, present. It's for presentation. Yeah. Yeah. Yeah.
So like if you were thinking about like a common thing in a presentation. Yeah. This idea that everybody's been in the presentation where there's a 5,000 bullets on a slide. It's like, no, this is the opposite of that. This is the detailed information in a tabular format. Yeah. And it's trying to get the point across as quickly as possible. Exactly. It might be like like a summary table, not raw data. So it's like really distilled. You're trying to get something across pretty quickly, but you're doing it in table form and you can still do that. You don't have to have a giant wall of numbers. You could, you know, you could make it parsable more easily. You can give it, you can narrow down the scope. You can give it like annotations and things like that. Yeah. Yeah. So that's really what it is. It's more like a, like a taking the best parts of plots and putting them into tables. Yeah.
Components of great display tables
Okay. You mentioned briefly there, like the idea that this might be something you'd see, you know, in a print form or web form, potentially since print, there's not as many magazines and newspapers as there used to be, but you know, definitely those kinds of things that you would see this in. Yeah. There's so many features I definitely want to dig into there, but you mentioned some of them. Yeah. You're trying to go beyond this just data frame, right? This idea of this. Exactly. Just columns and rows and maybe headers. What were some of the things that you felt were like, okay, these are, these are missing as far as like doing this job of being a display table or the components and things that you felt like, oh, this definitely needs to be there.
I definitely think it's interesting because yeah, like plot the word display table support. Cause the word plot is almost like cheating. Like, you know, with a plot, you know, with a plot that you're communicating. Yeah. And to your question of like, what, what's missing. I think it's tricky because table, we think of like a big rectangle, like you mentioned, right. But it's almost like the question, potentially a spreadsheet kind of thing. Yeah. But it's almost like the question, like when we're displaying it, when we're using a table as a visualization, what does it need? And I think a lot of the really beautiful parts are sort of like information hierarchy, being able to drive attention to the right pieces at the right time. And so like a plot, oftentimes plots have titles and that's, that's probably the biggest, one of the biggest pieces of the information hierarchy is that you're drawn right away to the title. It's really big. And it says, if you have two seconds, this is what you're seeing. So I think it's funny, like that might not technically seem like part of a table to people, but for display tabling, like plotting, it's like really critical.
And then having all those other trappings, like subtitles, footers, ways to kind of break up, like what's a row of the table and groupings. Okay. I think those really big structural elements are important because they really break things up and make it easy to kind of like group and move your attention right from kind of big things to like details. So I think structure is one really huge piece of tables that's often missing. Yeah. That kind of guides attention.
So I think structure is one really huge piece of tables that's often missing. Yeah. That kind of guides attention.
Yeah. I feel like these are skills, maybe a higher order Excel person who is involved in making presentations would learn through creating sub-level headers and sections and things like that. And in our space of data science, we typically aren't moving to a tool that does both of those jobs that is communicating the information. It's just the tools have been data frames, you know? And so the idea of like, okay, well, I want to like have this subheader, like I'm looking at this one about the New York air quality measurements, and it's got the subheading of like time and measurements. And then this nice, nice underlining indicating these are the columns that are indicated below it and kind of creating a, like you said, drawing your eye to it. So, yeah. And yeah, I just, I enjoy that. And also like the ability to have different fonts and sizes of things to make things fit. Is that stuff that I think about implementing those things? Is that hard for people to implement? It's not that hard because we have methods for all these little things. If you use enough of them, you should get a really nice looking table in the end. So we try to accommodate a lot of stuff, but the weird thing is we have to show that in examples. Like we need examples to show. It's always hard on a podcast.
It's not that, it's like in general, when you're teaching people this stuff, you really have to
show examples where all this stuff is like sort of like consistently there. But it's nice when you see it like, and all these little things add up to a great presentation, right? You change the font, you have like the column widths, just the way, so it's nicely proportioned. You have the sizing nice. You have maybe some borders put in, some theming. I mean, if we show that enough, we sort of like build people, like you can make really nice tables. If you just go the extra mile with these methods, then I think the point gets across that like, yeah, these tables are really nice and I can do them. Here's an example. It's close to what I want. Yeah. Some of the things that you've added that I think are really impressive are like the coloring inside of cells, if you will, of the table, like that solar zenith angles is just like a piece of art.
I love that example. And then a lot of the sports ones definitely have the same kind of vibe where you're having icons inside the columns there. And then also having small like bar graphs and things in there to again, sort of blend tables and plots and graphs to kind of together. I feel like a lot of this stuff has been built for plotting for a long time and graphing libraries. Why do you feel like there was the absence of that in tables? Like were there other attempts at this before your guys' exploration in here with great-tables?
Yeah, that's a great question. There's almost like two phases I feel like this went through. One is what you mentioned Rich worked on in our library to do a lot of this. And so he'd had like a few years running up to working on Python of just kind of exploring some of that space. Okay. And then there is in the Python space, Python libraries that have tried this. Like I think there's Plottable that works with Matplotlib. Itables that does some more simple interactive tables. And then things like Tabulate that's like a dead simple, like one function that puts out like a simple markdown table. But it's a good question. Rich had worked on kind of the more complex, like how do you create labels on top of your columns and things like that. Yeah. I don't know, Rich, if you have thoughts on like in the R space, what was there when you kind of started to think about how do you handle like structuring, formatting and styling? Yeah. R was a bit different in this space because it actually has lots of table packages. Oh, it has? Okay. Yeah. At the time that we started building like the R implementation in 2018, we kind of upwards of 10, maybe 12. They were different stages of development. Some of them were a little bit abandoned. Some of them, you know, were less cared for. Sure. But still like there was lots there. Right. And I don't know what that speaks to maybe because R is a stats heavy language and it has a native data frame. You just expect to take that and move it into a publishing workflow, which is kind of their LaTeX. And with R Markdown, we had that with other things as well. Okay. But anyways, yeah, at the time we wanted to make something, I don't know, not better, but like in the same spirit of like something that's like a little bit academic where it's like, you know, you can replicate these tables you find in journals, but we want to go beyond because, you know, we're not just dealing with paginated, you know, plots on like tables on a page, you know, we have HTML and we have, you know, like the web. So we want to go beyond that and like try to see where the best ideas taken from like tables in pages and see what we can do with doing the exact same thing on in HTML, for instance.
Yeah. And a lot of it just came from like the different, different sort of like buckets of features, which are formatting, structuring, and styling. So we want to go all out on this, all three sort of categories. Structuring is a little bit tough because like the way like the R implementation and great-tables expects a table, it's got to be pretty close to the final form of how you want to present the table. There's no sort of reshaping within great-tables, right? So we kind of expect you to have like a reshaped table close to like presentation. So we didn't change that from going to the R implementation to going to great-tables in Python. We kept that same, but we wanted to, we wanted to go maximal on things like formatting and like styling. We just want to give you as much creative freedom as possible. Yeah. It's tough. Cause like you got to choose like, you know, like you have to balance simplicity and also like power there, right? You want to have, make it simple for the user, of course, but if there's something you can't do, we want to make that possible as well. So that's kind of like a, the balancing act. Yeah. I, I see that a lot in plotting libraries, you know, like it's almost like a add on kind of things where you're like, okay, I want to, you know, add this functionality to it. Yeah. Was that, does that feel that way as you were building this library? It does. Yeah. Cause it takes a progressive approach, right? Each other statement adds a little bit more, right? Adds like one small feature and it's, it's such that you can omit any of the statements and you don't have a great effect on anything, right? They're mostly independent statements for the most part. Okay. Yeah. It, it, there's lots of similarities to this and like lots of client libraries, I would say.
The grammar of tables
Yeah. I think, I think it's worth noting too, that the R library is called GT, which is short for grammar of tables. So I feel like the grammar part's important. Does that come from the grammar of graphics kind of in the same, you know, rhyming with that? Yeah, a little bit. It's a bit of a riff on that. Yeah. Yeah. Okay. But I, I don't know that, that's one thing that struck me with great-tables and these tools is that it felt like that idea that there's a grammar, like for all the tables out there in the world, trying to figure out the right kind of way to express them. Yeah. That's, that's like simple, but also flexible and able to kind of hit the different examples. But it's also worth noting GT, GT was not available on PyPI when we began building great-tables. Yeah. So we had to have a discussion about like, what should this thing be named? And so it's worth noting great-tables is actually kind of a, a little rewriting of history from, we just renamed the acronym from grammar of tables to great tables. Yeah. As a kind of. It's good marketing too. Yeah. That's positive. You know, it's optimistic. You can make great tables with this. Not adequate tables.
This episode is sponsored by MailTrap, an email delivery platform that developers love. An email sending solution with industry best analytics, SMTP, and email API, along with SDKs for major programming languages and 24 seven human support. Try it out for free at mailtrap.io. That's m-a-i-n-t-r-a-p- dot IO.
Design philosophy and historical research
Kind of going into that a little bit, you talk about this idea of the grammar of it. Was that a process then to like, you have this article, which I think is really interesting. The, this is the design philosophy of great-tables. And you have like this historic research into like, you know, how to design great tables. And you have like this historic research into like, literally like tablets that have, you know, tablature layouts of, of stuff or, you know, table forms and so forth. Yeah. Is that something that you did at the time or kind of came up a little later to say, or was it kind of a mix of things? Like, you know, as I'm doing my research, I kind of discovered some of this stuff. It's a mix. I mean, we went back, right, Michael? Like, I mean, maybe you weren't there at the time. With GT. I have no idea how it, so I'm curious to hear from you. How did we get there?
I mean, with GT, we looked at some old, we wanted to get a lay of the land, not even just like our packages, but stuff done before. It's remarkably hard to find any information, any books on tables. I think just take it for granted. There's like plots. Yeah, sure. There's lots of stuff on plots and graphics, but not so much on tables. It's hard to find any, any writings on it. So we really had to research. And I mean, the hardest part is finding any, any writing on tables at all. I mean, there's like things like, like style guides you find in journals and they have recommendations, but nothing. We were lucky. We found something. I'm not even sure how I found this. I think someone mentioned a long time ago. It's like this large work on tables from the Census Bureau. Oh, okay. And it's called the Manual of Tabular Presentation. You might've seen that maybe in the post. Yeah, it's in the post. Yeah, it's really cool. Yeah, yeah, yeah. And that's like 1949. Yeah, 49, 49. Good year. But it's a great book and it's available, it survives as a scanned PDF that if you just search it up, you can find it. And what a book, like, I mean, like it goes through like nearly almost, I don't know, well over 250 pages of just like table recommendations, what to do, what not to do. And like, I mean, it's, it's focused on census. It's basically a census table style guide, but it can be, it's useful everywhere, I think. I mean, some of the stuff in there is, I mine ideas from that all the time and like, there's so much good stuff in there. And there's nothing else like it. There's no other like book on just like tables. Like this is, these are the best ideas we have. So.
I think about the, the, the history of that because like, you know, that's the dawn of civilization of like, you know, we're going to count the people, partly so we can tax them. Dang. Of course. Yeah. You know, and then like early forms of accounting, I'm guessing too, right? So, but, but yeah, it would make sense that when suddenly there's a organization of government that's going to count people that they would want to, you know, codify it or whatever. Oh yeah. Basically way back then, Mesopotamia, they had big city problems and like, you know, like trading issues. It's amazing when you look at those tablets, those like scans and drawings, like recreations, they have all the, all the features that we have now, like, okay. Like sub rows and like headers and footnotes, like notes. It's like, you know, missing, missing cells. It's like pretty wild, actually. Yeah. Yeah. How much they got right. Yeah. Yeah. Totally. You're not seeing the things that were removed. You know, there's so many things that they got right at the beginning. So that's good.
Favorite features
What are some of the favorite features you have you want to call out that are parts of great-tables? Hmm. What do you think, Michael? What are your favorite features? Good question. I honestly, I, I think some of my favorites. So there are some big, they're like some heavy hitters, I think worth mentioning, like nano plots, where you can make like a small bar plot or a line called a sparkline in your table. Yeah. And I think these are really great because they kind of balance the value of a plot, like quick patterns with some of the compactness of tables. So you can have a bunch of lines just indicating like how something doing over time. But I don't, some of my favorite parts have been even the silly parts, like the column spanners. So this is like putting labels over your columns. Yeah. Like when I started looking at working with Rich, I, I realized I hadn't really done a lot of styling. Like, like in grad school, I was like copying data out and using like Excel or Microsoft word to format. Right. But it's even the concept of like putting a label over your columns felt a little bit surprising and foreign to me. And that that's one thing I've really loved is this idea that these are like really small, basic things you might do to make it better. Yeah. And now they're kind of like quick and easy to do. And, and people love it. Like when we had, you know, like a constrained feature, only one level of spanners, people like, we want more. Come on, come on higher. Yeah. That's not enough to this guy. So like, yeah.
Yeah. I think the aesthetic stuff really jumps out to people too. You know, like if you see a research paper and it's just like raw table after table or page after page and they aren't doing the summarizations or not like leading your eye in the sense in this, but it's hard, right. As a, as a programmer or even a data scientist, you maybe understand what you want to draw attention to, but you don't have the design skill. Yeah. And so do you feel like this is something that would help them quickly get good results? Yeah. One of the first things Michael did is make a gallery for like great-tables. And like, that's so important to have like good examples upfront. It gets your imagination going and what's possible. Right. And then the codes right there, if you want to see it. Yeah. I think that's super important. And, and the examples we have, we try to make them nice, you know, so we try to like impress people a little bit, but also just let them know what's, what's possible, what you can do.
Yeah. Yeah. I think, I think one thing that helped with the examples too, is because I am a table barbarian. Like I hadn't, I didn't have four years leading up to it and the US census manual of tables at my disposal. So I think it helped. I was just like pulling out of Rich's brain. The, it's almost like the examples gallery is like me taking notes on neat tables that as Rich is just like flinging tables left and right. So hopefully one thing that makes it nice is it's like, it was like an explainer to me as a total novice to tables. Like what, what's the deal and how deep does the rabbit hole go? Yeah. Like you mentioned the Zenith angles. Yeah. That styling can really like kind of go all out and do a full color map. Yeah. And all that stuff. Yeah. It's a neat way, like heat maps in a different way, you know, like that include the, you know, the numbers and all that sort of stuff. Yeah. Yeah. It's kind of wild when you have a heat map, it's almost like the colors come first and then the numbers become the annotations, right? You can just pretty much read it like just based on like where it is on the grid. Yeah. Comes like a graphic. And then if you want to know the number, just look at that secondarily, right? It's sort of turns the problem on its head, which is great.
It's kind of wild when you have a heat map, it's almost like the colors come first and then the numbers become the annotations, right? You can just pretty much read it like just based on like where it is on the grid. Yeah. Comes like a graphic. And then if you want to know the number, just look at that secondarily, right? It's sort of turns the problem on its head, which is great.
One of the things that is a feature in that is with the, let's say lighter shades of the color that are not maybe as deep, you are using, you know, black for the text that's in the, in the cells. And then for the deeper, darker shades that are more opaque, you're switching to white to kind of highlight that there. So it also makes it stand out. Is that something that someone has to implement themselves or is it something that it does automatically? Totally grid tables. That'd be so annoying to implement, right? You'd have to know like color levels, the optimal sort of contrast. It's like, thank goodness, like that's handled. It's what notes would say to grid tables. Yeah. Cool. I think. Yeah. And like,
what'd you think of that, Michael, when I showed that to you?
I think it's a really good example of our dynamic, like how we work together is that like on this library, I approach it a lot like a software engineer. Like I'm kind of here to help batten down the hatches and, and like build out the like guts, but that, that type of thing, like, yeah. Bending over backwards to help a user get the right contrast, like switch the text from dark to light. I don't, in my engineering brain, there's a temptation to be like, oh, that's your problem. Like, like use a, use a function and hand it over to them or like give them the tools and be like the powers in your hands. But, but I don't, I really appreciate that Rich, I think hit the reality of like, there's maybe too much flexibility we might give people if we like task them with that contrast, it might not hit as nice. And so I really appreciate the division of labor where I, I could put kind of an engineering hat on and think about battening down the hatches. And he's kind of, I don't know, in my mind, like really bent over backwards to do the right thing out of the gate. Yeah, no, it's, it's been incredible. I think engineering brain, I might do the wrong thing and just say, it's your job. So yeah, I really appreciate that dynamic. Yeah.
Was there a lot of thought that went into that then, Rich? Like the idea is that, that I don't want to control what you can do, but I want you to have a nice result. Yeah. By default. Yeah. The defaults. Yeah. Certainly you can escape out of that. You can, there's an option just to turn that off and you handle, you know, like the text, we only touch it. We'll just, yeah. But yeah, certainly. And like, there's even been revisions along the way in your implementation to make the contrast better. Right. We started with something that was like, Oh, I forget the standard. It's using the web, but I think there's an upcoming one that's starting to gain currency called APCA. Okay. Which offers even better contrast. There's certain color combinations where like, you just see it and you're like, Oh, that's not the, that's not right. I mean, it's APCA, APCA really handles it nicely. It's like, wow, this is just an improvement over, over that. So yeah, it's definitely something I've cared about a lot and sort of kept up with because I think it's so important, like, you know, to make tables readable no matter what you do.
Yeah. Yeah. Yeah, definitely. Like I, I think of having lived through the nineties and desktop publishing revolution happening and everybody could make a zine and they put every single font and it's possible. And you're like, wow, that's really fascinating, but pretty ugly. Oh yeah, early 2000s. Myspace continues. Yeah, exactly. Yeah. Right. It's like, make it however you want. Yeah. So yeah, it's that kind of idea of like having that balancing act of like, you know, how much control should they have and, and then be able to turn them on and off. So that's cool.
Output formats and accessibility
I wonder about that on the output side. How are these output? Like, is it, is it output as when you run that code, is it output as a graphic or as a text or like how, how is it output? Yeah. Basically what we have right now is HTML as like the main output. Okay. And we also have like a way to capture tables as images, PNGs, PDFs, even in other image formats. So we've got those two things down. The future, which hopefully is not too far in the future, we're going to work on other open formats like LaTeX, maybe Typed, which is an upcoming one. If that's a good challenger to LaTeX, maybe, maybe not. And also things like Word output tables, like just basically having a table that is XML.
Exactly. That could just be put into a fresh Word document or possible to embed it in an existing one. Okay. So is that like something you put at the end of the code to say to this format, you know, or whatever? Exactly. Yeah. Yeah.
And we do have a hotly, like probably one of the hottest issues is people really want interactive tables, like paginated. So I think in the name of display, we've went hard on static, like really getting it right for publication and print. But people love... Because it's totally missing. Yeah. People really want interactive, like paginated or like easy other, like collapsible things. Yeah. That's what I was thinking. Yeah. Expanding and collapsing. Yeah. It's a totally different use case for exploring data more, right? I mean, you can filter through, you can just find stuff, you know, a larger data set, maybe. Yeah. It's definitely a use case we don't want to ignore. So Michael's doing some serious work on it.
The one, the thing I thought you were going to hit at Rich was opening tables in the browser that I was surprised to learn, great tables. There's a lot behind tables in accessibility. So like screen readers and things like that. Yeah. Like GT, the R packages has done some serious work on that in the past. And I don't, Rich, maybe you could say a little bit about those aspects of tables. I'm less familiar, but... Yeah. Yeah. Really interested in them. We, yeah, we collaborate regularly with a blind professor, a computer science professor at University of Illinois. Okay. I believe that's correct. I'm hoping that's right. Yeah. So we did a lot of work on making tables accessible to screen readers. And, you know, when you get to like making tables as, you know, a true table, like a table element, right. Instead of like interactive tables, they typically go to divs, which are maybe less accessible in terms of screen readers. Yeah. But maybe not, maybe they solve that problem. But we got it so that in our collaboration, we got so many of the recommendations for making tables screen reader friendly. Even, so when you introduce complexity, like complex headers with spanners and even row groups, you have to, you have to do a few things in the, you know, HTML code to make that not sound terrible to a screen reader, right. To orient itself. Right. Right. Yeah. So we've all those recommendations. And like, so the feedback we got in the end was, yeah, this is probably the most successful table package available in R.
yeah, this is probably the most successful table package available in R.
Nice. And so we took all that stuff and we, we wrapped that into like our outputs for great tables as well. So that comes along for the ride. So it's a great example of like, you know, learning a lot in a very long development cycle and taking that distilled bit of learning and like hitting the ground running really hard in Python. Yeah.
Yeah. Cool. Like when you talk about output being HTML. Yeah. In that sense, then is it scalable? Like, oh, you could pull things horizontal, pull things vertical. And it kind of keeps all that sort of stuff in line. Yeah, exactly. Yeah. And like we have containers as well, so you can scroll with tables and so you can be pretty flexible in how we sort of like, you can embed a table, the HTML table from, from great tables really nicely in different contexts, like in different blogs or whatever.
Dependencies and data frame support
Nice. Yeah. Are there a lot of dependencies for the, for the package? Not too many. We think pretty low. I think super few. We are, we're trying to, we're cognizant of keeping it low too, right? We're not. Okay. We have a few we had kind of early on that more for convenience that we've started to kind of whittle away at, but I think, okay, I think right now there's really few dependencies. Yeah. Almost done there. We have one lingering dependency on NumPy. It's kind of the last data library we depend on, but even that we want to take out so that people can kind of bring either like pandas or polars and so that a lot of these will be optional dependencies. Okay. But won't have to have kind of a big install.
What would the normal workflow be for a Python data scientist coming in to add great tables to their project? You mentioned now three different sort of styles data can kind of come in. You mentioned pandas and NumPy and you mentioned polars. Does it matter the format and how does it look kind of starting and adding great tables to a project like that? It's really simple. One exciting thing is for polars v1, which is coming out soon. The style property will return a great tables object. So you'll just be able to say like my data frame dot style and get a great table out of it. For things like pandas, it's easy to, you just call, we have a GT class that wraps the data frame and then you can call the great tables methods to add things like headers and kind of organize or highlight information.
I do think the most, some of the most exciting things are polars related. And this is something we learned sort of like early on, but after we'd started developing great tables is that polars has a few really nice features that make it work really well with great tables. And these are like, they have kind of like some special functions and interfaces to say, select columns of a table. So if you wanted to like grab a group of columns to put a label over them, it's really easy in polars to say like, give me every column starting with ABC. Okay. The other things for styling, polars, these same things, lazy expressions, make it really easy to just tell great tables, like I want to make every cell yellow where this value is like equal to something, or I want to make every NA value, I want to fill that cell to be yellow. Okay. And this is kind of just part of polars design is it has these lazy expressions, but whether or not you use pandas or polars, all of this is possible. Okay. Yeah. I believe pandas gives lambdas, right? Yeah. We tried to kind of fit to the style of the data frame we were using. Yeah. And that's been a bit of a transition, right? Like initially, you know, first versions of great tables were more geared around pandas. Is that right? Yeah, that's right. And we pretty seriously air gapped it early on. So we moved all of our data frame specific stuff into its own module. So that really helped that we didn't have it as spread throughout the code. So it was pretty quick as we rolled polar support, we sort of had all our data frame stuff concentrated and could kind of slot it in. And that's, I think that's something I've seen in a lot of libraries more recently is I think a lot of libraries are doing more like pandas and polar support. And so kind of keeping a lot of their data frame stuff in one place.
Yeah. I didn't research this, but what is it written in? I mean, I know you started in R, but what is the core language that great tables is written in? Oh, it's Python. It's pretty much all Python. Yeah. Okay. Yeah. I think it's a fair question though. Like in some world we would have said like, oh, it's like a Rust library, you know, but yeah, it's coming so hot right now. Yeah, it totally is. Yeah, it definitely is. I've had a few different conversations about it and been interesting talking about just the world of data lately and definitely talking about what Wes is trying to do, this idea of decoupling things and not being so dependent on one or another and which I think is great. I think that whole, the less sort of religious examples that you have to buy into and be a member of is great because this is all just tools. Yeah, absolutely. When it comes down to it.
Graphics in tables and favorite features
team member, Martin Bryce. He shows you how to install plot nine and set up Jupyter notebooks. Use plot nine to create visualizations in an efficient and consistent way and combine the different elements of the grammar of graphics, which involves several layers, including a data layer and aesthetics layer and geometric objects layer, along with several additional techniques within the grammar of graphics. You'll learn how to perform statistical transformations and how to implement a visual style with themes. And you'll learn how to export your data visualizations to files. Data visualization is a crucial step towards sharing your results and findings. And I think this course will be a worthy investment of your time. Real Python video courses are broken into easily consumable sections and where needed include code examples for the technique shown. All lessons have a transcript, including closed captions. Check out the video course, you can find a link in the show notes, or you can find it using the search tool on realpython.com.
One of the things I was wondering about with, again, some of these really cool examples that you have shown are some of these ones that have to do like sports analytics, which I guess people would have normally maybe seen online or again in a magazine or something like that. This idea of like adding graphics, is that a difficult thing to do inside these tables? I mean, it's not difficult for the user. I mean, it's a little difficult for us to plan the API for that. I guess it relies on having the graphics on disk or accessible through HTTPS and things like that. And then, you know, referencing what these graphics are in a sort of nice way, right? Okay. So we did a few things to make it so you can sort of use patterns and the like to construct like a path, like a template for a path, I suppose. Yeah. And then we just made it work and we have, you know, sizing options as well. So graphics in a table is always going to be a little bit difficult because cells are small. Yeah. Like are the graphics going to be, you know, stretch out your cells too much? Like, of course you have that. But we at least have at the, you know, at the method level, some ways to size things. So I think it turned out great. I saw this example where it's sort of like overlapping, almost like taking the top of one and overlapping it on the bottom of another. Is that a feature of it? Oh yeah. You can totally do that with some sort of like HTML, sort of like, not trickery, but some, you know, if you're really good at CSS and stuff, you can make that happen with overflow. Nice. Attributes and things like that. Yeah. I love seeing that stuff. Whenever I see it, I'm like, wow, you really wanted something and you just got it. You know, you made it happen. Yeah. I mean, by default, you know, it's not really available, but you can make it happen and you get a density of information if you overlap things. It's great to see.
We touched on this a little bit. I don't know if I got your favorite features, Rich. Oh yeah. I mean, okay. So Michael mentioned nanoplots. Love it myself. I also just like, as a sort of like a bag of features, like one collection formatting
methods. I don't know why I love that so much. It's just like, it's such a simple thing, but it goes so far. Yeah. I mean, just like, just a simple thing, like formatting something to a static one or two decimal places, like numbers. Okay. I mean, that's wonderful. I mean, that's so simple, but it can run deeply. You can, you can have things formatted to specific domains. Yeah. Like financial stuff like that. Yeah, exactly. Yeah, exactly. So, so it fits within expectations of that domain. I think it's great. And I think there's so much you can do because it really just transforming data to another form, which is more palatable for a table, you know, like reader, I guess you can say. And I think there's so much you can do.
I do think it's really fitting in a theme like Excel came up. I feel like yeah, your love of formatters is your love of like, yeah, the ease of Excel. Yeah. When creating a table, like millions of ways to format things fast to apply. Yeah. And it's kind of nice that we sort of broke it up into different methods. Like each method is sort of optimized as a specific interface just for the formatting task at hand. Yeah. Instead of just having like .format. It's like, okay, now you've come up with a specialized syntax to make that happen. But I don't know, there's so much stuff around specific types of formatting, like, you know, additional server arguments, which are just related to like one or two types.
I love the fact that it's sort of broken up and sure, it could be overwhelming, but we try to sort of cure that overwhelming sort of like amount of like methods through better documentation.
Building examples and the table contest
Yeah. Cool. One of the things that you mentioned, Michael, of coming on board is, you know, creating this really great like set of examples. Let's kind of get going. And are there ones that you've wanted to add that you haven't gotten to yet? There's like additional things you're like, oh, I want to show examples of this. Or is it something that's rolled out as features have rolled out? Yeah, it's a good question. I feel like there's a ton that we want to add. We just did a, well, what is this the third table contest, Rich? How many table contests have there been? This might be the fourth. Okay. Wow. Okay. That sounds fun. It's hard to keep count. So we, yeah, we have this table contest. It's great. Like Posit puts it on. It's a celebration of tables, lots of prizes. You just submit tables and the code. And wow, like people are, we posted on it and people are just, I hope people are agog with like all the tables.
Okay. I'm agog. I'll have to get a link from you to get the examples for that. Yeah. Previous contests. Yeah. I think the winners are being announced like within a couple of days too, for this contest. Okay. So we might have it. We should have it then. We should have the link. Okay. But yeah, I mean, in terms of coming out at examples, like even the existence of the table contest confused me. Like I was like, oh, of course you like, you've been running contests where people submit tables for the past three years. Right. Like just classic, classic open source software development. But I think, so with this latest kind of like contest, I think there were, were there around 60 submissions? Yeah. About that. Yeah. And they're so inspiring. Like these, every single time this, this thing rolls around, I'm like, whoa, that's neat. I seen some crazy stuff. And it's, it's so, you know, like I've heard this before, video game designers, like they make the games, but they're not so good at the game sometimes. Like the players are way better. It's kind of like this, like we, we make our, we make tables too, but they're not as good as people in the community. Like speed running and things like that. Yeah, exactly. Yeah. It's exactly that same parallel. It's like, yeah.
we make tables too, but they're not as good as people in the community. Like speed running and things like that. Yeah, exactly. Yeah. It's exactly that same parallel. It's like, yeah.
Yeah. It's, it's funny. Yeah. You have no idea what, how people are going to use the thing that you've created. And that's really inspiring. I'm sure. Yeah, definitely. It's when you said overlapping images and tables, I was like, I have no idea what's happening, but I love that somebody did like figure it out. You might get a player, player, like it was like a player thing. Yeah. And their head wasn't covered over by the other person or wasn't chopped off. It was like they were, they were sort of stabbed. It goes into like the neck of the person, like, like folder tabs kind of thing. It was cool. I do think that is evidence that people better than me are making tables for sure. Yeah. I definitely think audio files in there. Oh my gosh. It's like videos, even. It's like probably a pretty common thing. Links and yeah. Yeah. Yeah. But I suspect we'll, yeah, we'll probably pull some of those into examples, but also we need some way to just get out a lot of these freaky tables that people are submitting to these contests.
Quarto and documentation
Cause I think they'll really kind of be a good next example set. I was going to say, can we bring up a Quarto doc because we wouldn't have such good examples or a great project website probably without Quarto doc. I mean, not as easily for sure. This is Michael's thing. This is Michael's thing. Yeah. I, I was, I've wanted to get somebody on to talk about that. Uh, generally, um, you're saying, um, Quarto doc or I'm not going to pronounce it. Yeah. Quarto doc. It's kind of tricky. I think Rich is schmoozing me because I, I maintain a tool called Quarto doc, which generates, um, API documentation for Python. So, so great tables, kind of like API reference. It's powered by a tool called Quarto doc. Okay. This is, I get the confusion because there's a tool Quarto doc with it works with a tool called Quarto. Yeah. Yeah. So Quarto is kind of the real star. Um, and it's, it's a tool to make it easy to produce like reports. So if you're doing a data analysis, you know, to generate like an HTML report, it's like maybe going beyond a standard notebook to something a little more presentable, but still interactive. Yeah. And it uses a really nice format that's called QMD. So it's all text-based. Okay. It's like a beefed up markdown setup where you can put in code or markdown. So great tables documentation is built with Quarto. Okay. So that's a neat thing. You could create like a single standalone report or like a full fledged website or slides pretty easily. Okay. Yeah. And examples really benefit from that because we just pop the examples in line, get the actual like table outputs and put pros around them, you know, nicely formatted pros. It's really quite nice. If people want to see examples of that, is that in your documentation itself then? Yeah. It's on the great tables website. Yeah. Yeah. Okay. And then, yeah, if you go to Quarto.org, you can kind of see the range of sites that get built with Quarto. Okay. So for example, I know, I think Philip Cloud from Ibis came on a while ago. It looked like, so we worked together, um, and their website's built with Quarto now. Okay. So Quarto doc is supporting like their API generation, but the really nice thing in open sources, it's just a little bit easier to, I feel like add examples with Quarto because it's really made to run code and generate websites. Okay. You'll notice like the great tables websites, like filled with tons of code and our guide, like we've tried to really go all out in like examples throughout. Yeah. And I think a lot of that is Quarto. It's just a little bit easier to write and have it all get generated. So, so again, a tool that's assisting you in this whole process.
Yeah. And I do think it's, it is, it is funny in open source, like lowering the barrier for executing code and having examples in your docs is I think surprisingly impactful. Like, yeah, as it turns out, if you have a little bit of friction, you just don't like adding examples. Right. One kind of nuts case is great tables doc strings. So if you look in the methods, there are tons of like really long examples and the examples produce pretty rich outputs. It's a little bit unusual. If you look at tools like pandas or polars or things that are using Sphinx for documentation, or just the standard, what's it called? The built-in Python doc format where you use kind of like three greater than signs. The dots. Oh yeah. The examples tend to be pretty short because you hard code the outputs of your examples. Right. In your doc string. To be able to do doc test on it. Right. Yeah. Right. Yeah. Doc test. But that, that creates a kind of funny cycle where now as you're writing docs, you're like, oh, I have to create an example small enough to hard code the output. Yeah. Okay. If you think of a table library, that's a bananas task force because we have to output a table. And so it's nice with, with Quarto we're just executing large blocks of code. So we're able to give people pretty rich doc strings with nice long examples. And that's been a really nice kind of cycle to get into, but it's a funny, it's like a small dynamic, you know, like, do I have to hard code my outputs? And it happens a lot in open source, but it's had a pretty big impact, I think, in how we approach docs and break it down. Yeah. Go maximal with examples, which is, which is great. I think. Yeah.
And I do think it's, it is, it is funny in open source, like lowering the barrier for executing code and having examples in your docs is I think surprisingly impactful. Like, yeah, as it turns out, if you have a little bit of friction, you just don't like adding examples.
Yeah. That's the, I mean, one of the things I do every other week is, you know, we talk about articles and stuff in the, in the Python community, but we also look at projects and I want to run their stuff. You know, I want to like. Play natural. Yeah. If I'm going to suggest this as a, you know, a thing of the week to check out, if I can't get through the docs, I can't set up stuff. I can't run an example. Like, it's like so crucial, you know, to like making it. And so like anything to make it easier, especially if it's like a single person shop, that's a, that's a huge deal. So that's awesome. All right. Well, definitely include the links for that.
Tidy Tuesday
I wanted to build on top of the, you know, kind of the contest thing. I feel like this is semi-related and I haven't had anybody on to talk about it, but I wanted to talk about Tidy Tuesday a little bit. I'm sorry. Is that right? Yeah. Yeah. And we were talking right before we began and you said that you have some experience and have been involved in it somewhat. And so maybe you can tell a little bit about what it is and how you're involved with it. I mean, I've heard about it a long time ago. I used to follow like, used to be a thing, like it's not so much now, but in R we had a lot of like social media activity on Twitter. Many through the R stats hashtag. And then also the, I think also the Tidy Tuesday hashtag, I don't know, but it used to be like full of stuff. Like my feed would just come, oh my God, filled with like examples of the Tidy Tuesday. I would know what the Tidy Tuesday dataset was because I had to see tons of examples on the dataset of the week. It was wild to see that. That was an example of overload, but it was always inspiring. So I'm like, and I think I owe a lot of debt to like care, for examples from Tidy Tuesday, like seeing all this stuff is really, like I said, inspiring. So I want to inspire people, obviously in my own works. So like spirit of Tidy Tuesday is wrapped up in GT and great tables. Like we have lots of datasets. I mean, just recently I had a PR. I sent to Michael, let's add, I don't know, five, six new datasets. And he was like, sure, let's go in that direction. We have, I mean, we're gonna make a lot of examples, so we have to have a lot of datasets and like Tidy Tuesday is all about datasets and making samples and being inspired and having fun in the process. Have you played with it much, Michael?
Yeah. I use it a lot for mentorship, which has been really nice because I think that there's this funny thing where like, if you watch certain tutorials, sometimes things are like a little bit too clean. And I think it's really good for mentorship. Yeah. You're like, wow, this really worked out really sweet. Like this path was nice. It's not very real world at all. It's the whole like 80, 20 thing. It's like 80% of your time is just like getting this ready to be able to like start working with it. Right. And I do think those are valuable in their own right to kind of get people started. But I think Tidy Tuesday has been really nice to like, be like, let's see what will go wrong. And let's see what happens when you hit an error and you have no idea what caused it or like your CSV won't read for mysterious reasons. And I feel like it's been really good for data science mentorship to not only show people that and have them try it, but to hit it myself and be like, hmm, just going, I'm like, I don't know why this broke or like reshaping data, just like working through it. And then like figuring out what did I do that kind of like, how did I even approach this problem? Yeah. So there's, there's a really great data scientist, Dave Robinson. He does this all in R, but he used to record himself once a week for an hour analyzing Tidy Tuesday data. And I found it so inspirational. It was one of the big inspirations for working on Suba and tools for data wrangling that I got to watch him live, work through analyses and see how quickly he could do things. And also, I'll see how he edits his code because when people work, they like, they go back, they adjust code, you know, they move things. Right. Right. Yeah. And that's really hard to capture when you write something out. And so just seeing like, what is this first five minutes look like? How does he get to a plot quickly? And what would I have to do to kind of like keep pace with him? Okay. So I've really enjoyed those aspects. The more like in the weeds, rough, unclean, kind of like realistic analytic settings. Yeah. I think it feels like this is, you know, the data community's answer to like code challenges and things like that. You know, here's something to puzzle through like what the advent of code and things like that in that vein. I know there are some other examples, but this is one that's at least been ongoing, just really kind of cool. So I'll definitely include some links for people to check out and learn a little more about it.
Yeah. It has amazing steam power. And Dave has a lot of this stuff on YouTube, right? Pretty much all of it, right? The complete archive. Yeah. Okay. I think it has one big, like what it complements things like advent of code in one really big way, which is it's a different type of exercise. Like advent of code says, how would you get this solution? So it's like, here's your starting point. Here's the ending point. Get there. Teddy Tuesday says, here's the starting point. Move, like move through the space. Yeah. What do you want to draw out of this? Yeah. Yeah. And that's basically what data analysis is. It's like, usually you don't have the end, you just need to, you need to like dune buggy around. You're almost developing the question sometimes as you're coming toward the answer.
Yeah. Yeah. And the great thing is like, we used to see tons of plots from Teddy Tuesday's data sets. And then later on, we started to see tables and it's like, tables. Yeah. So like, cause there's no constraints on what you can make. It's like, nice to see. I love that. Can we all start with Rich? What's something that you're excited about that's happening in the world of Python?
Oh, I think just Polars becoming a big force, like becoming integrated. A lot of libraries are now considering and implementing multi, like pandas plus Polars. And also the other thing that is, Markzware really has this package called Narwals, which basically helps to make that possible, creating the backend for you. So, and tons of methods. So you can incorporate both data frames in your library. Okay. That to me is pretty exciting. It's like integration, interoperability. That's just one part of it, but that's a pretty interesting part of it for me. Yeah. Yeah. Michael?
Yeah. I think it's maybe two things. One is for sure Narwals, which is, basically write Polars code and run it on a pandas data frame. I love that style of interface where you can think in one thing and have it work on another. Because I think that our thoughts are the most important thing, like the strategies and the things we've learned are the most important thing. Like, I don't want to think about whether a method's called like mean or average across six libraries. I want to choose one library that I love and have an engineer work out the details because I think cognition's the hard part.
Because I think that our thoughts are the most important thing, like the strategies and the things we've learned are the most important thing. Like, I don't want to think about whether a method's called like mean or average across six libraries. I want to choose one library that I love and have an engineer work out the details because I think cognition's the hard part.
The other is I think plot nine, the plotting library is a hidden gem. It's one of those libraries where I think for some reason, I think it gets overlooked often when looking at plotting libraries, but then when you talk to people, there's like this really zealous group of plot nine fanatics. And I've been working with plot nine's author, Hassan. He's been working on this tool for probably nine years now. And he himself is a fanatic. He's just dedicated to these very subtle plotting issues. I think of the same sense that we talked about color contrast, how Rich for great-tables made it easy to like, you should have white text on a dark background and you should switch it to dark text when it's a light background. I feel like Hassan has done a lot of the same things for plotting, like the ergonomic benefits. And so I'm working with him on writing a guide for plot nine that we can put on the site to make it easier for people to get started and to kind of learn the basics. So I'm really excited to work with him on that and to use documentation to try to really bring out the story of plot nine because I think it's amazing to see the amount of time he's put into it. And as I talk to him, just the types of problems that he's saved me from, but that I wouldn't appreciate because he did so well, if that makes sense.
Like, yeah, yeah, set you up for success that you didn't even know about. Yeah, that's cool. Yeah. So I think those two.
That was the library I was thinking of when I thought of the, in the Python world, the grammar of graphics is definitely there. And the idea that it's related to the, sort of the grammar of tables that you guys are developing here. Right. Yeah.
What to learn next
Awesome. So Rich, what's something that you want to learn next? This doesn't have to be a part about programming. It could be anything, but what do you want to learn? So many things. It's like trying to enumerate all of them. I think I do want to learn programming. I mean, not programming. I mean, to be a better Python developer. I mean, like I'm doing it right now. Michael has been supremely patient as a mentor for me coming from R for so long and switching to that. Sometimes I, I'm like, Oh my God, sorry, Michael. Like this is a, this is really bad. Poor show, but he's very patient. I just want to keep learning more Python. I mean, I want to learn other things too. I want to do other things, but you know, like maybe play more bass and that's fun. So play bass as you learn Python. Yeah, exactly. When I combine the two. But I think becoming a more proficient Python person would be, would be great. And then I really want to go down that road.
Yeah, that's awesome. Are there any specific tools or things you're thinking of using in that process? Well, I'm thinking of taking a course and as well, you know, doing more open source projects, maybe like a personal project as well. So it's not like, you know, all like production stuff. It's kind of like I can noodle a bit. So I'm part of it's just looking around and finding some nice new books. It's changed a lot, Python, like quickly. Yeah. Pretty dramatically. Yeah. I mean, I used it before in a job, but that was like, like 2.7 type of days, you know, like that sort of thing. 2.9, I think it was. So I want to get more up to speed and maybe go a little bit deeper in. Cool. Give my glow break.
You'll have to send him the right, like Real Python tutorials. Send him down that rabbit hole. Yeah. This, that just makes sense.
All right. So Michael, what's something that you want to learn next? I, I've been going down this funny rabbit hole of documentation, like what makes documentation good. And I think in two ways, like if you look around at open source tools, what are all the different approaches people take and what seems to work well and what seems to cause some challenges. I've noticed a little bit of like variation in people's approaches. Like one of my favorite is that I think Pydantic and FastAPI, they chose not to document their API first. And that's surprising to me because I find most engineers are like, I've got to document my API. You know, I've got to like document each function and class. They went the other way. They wrote user guides. And I find that a really inspiring move. So I've been thinking a lot about what adds up to like really great documentation, the guides, the examples and stuff.
Yeah. It sounds like the workflow also, like when in the process do I do this? Because if it's a, if it's a stumbling block for a developer, like, oh, I have to do this now. Whereas like, maybe they'll find it easier to do the user thing first. Yeah. Right. Like it could actually shape the design of the tool even, because if it's hard to explain in a guide, it could even be like the tool needs to be reworked a bit. So I could see these things.
I think on the side, maybe we had a friend recently invite us to harvest honey. So he's a beekeeper and he was like, yo, do you want to harvest honey? Six hours later, we're like, we've got like several five gallon buckets filled. We're like dripping in honeys everywhere. We had to power wash it off. But he, he was like, you, you too could keep bees. And I think that that maybe awakened something in us. So do you have a spot to do that? We could, our, our backyard's long enough that we could have a little bee zone. So I feel like something maybe was awakened in me. We'll see. That's cool. We'll see where that goes. I think my wife would love, love that. I think she's, I don't know, it's a double-edged sword. I think she thinks that they're, they're fascinating, but she's also a little terrified of them. So. Yeah, that's tough. They do have like a weapon on there, but so I don't know. Yeah, exactly. You got to be careful.
How to follow the project and the team
That's cool. So what, what I wanted to leave with is how could people follow the work that you do online? We can maybe start with the project itself and then how people could follow yourselves individually. Yeah. Well, I'm on LinkedIn. That's like, okay. People are going there a lot. If people are still on Twitter or whatever it's called these days, we actually have a great tables account. Okay. That would be the one to follow there. Yeah. It's actually GT underscore package. Okay. I like it works in both cases though. Yeah. Yeah, it kind of does. Yeah. I mean, it was chosen a long time ago, but it's pretty, I love our naming system. It totally works. So that's the one way to do it. And of course, you know, great tables site, which I'm hoping is searchable. Yeah. In which are a way you would search for that sort of thing. Okay.
Yeah. What do you think? I think, yeah, I'm really kind of like huddled in on LinkedIn these days and where I guess great-tables is also a PIP install away. Yeah. PIP install great dash tables. Yeah. Oh, we got discord as well. Oh yeah. Okay. Yeah. If you just look at readme great tables, we got, we got some ways to get in touch with us. We really want to hear people. So people get in our discord, ask questions, introduce themselves, ask other people questions. Great. It's a great sort of Q and a place if you want to go there. Okay. Yeah. I think it's fun. I would say too, with the discord and things like GitHub discussions, like I wouldn't hesitate to put anything there. We're like so curious about the experience of using great-tables. And I think even if you, you feel like you have a silly question or issue, we learn a ton from like every problem people hit. Yeah. It's probably something we overlooked realistically speaking. Like, sure. So it's, it's a big service. I think whenever people even hit a problem or feel like something wasn't intuitive, we're super open to that. I think, I think it's a big service that, that people provide. Great. Well, Michael, Rich, it's been fantastic to talk to you. Thanks for coming on the show. Yeah. Thanks for having us. Yo, thanks for having us.
And don't forget, this episode was brought to you by MailTrap, an email delivery platform that developers love. Try it out for free at mailtrap.io. I want to thank Richard Ione and Michael Chow for coming on the show this week. And I want to thank you for listening to the Real Python Podcast. Make sure that you click that follow button in your podcast player. And if you see a subscribe button somewhere, remember that the Real Python Podcast is free. If you like the show, please leave us a review. You can find show notes with links to all the topics we spoke about inside your podcast player or at realpython.com slash podcast. And while you're there, you can leave us a question or a topic idea. I've been your host, Christopher Bailey, and look forward to talking to you soon.
