Joram Mutenge

Joram Mutenge

@jorammutenge.com

My data consulting company https://www.conterval.com/

70 followers19 following479 posts

#PyConUS talk at Long Beach, CA went superbly. Many people came to me with questions in the hallway, some of which I didn't have the answers to. All the more reason to dig deeper into @pola.rs

Just heard on the news that: An average American consumes more energy in a month than an average Indian consumes in a year. Now that's staggering!

Blogging is like a cheatsheet for your mind. Whenever you have a conversation with someone on a topic you've written about, you are guaranteed of offering an intelligent contribution.

What if you wanted to round time the way round decimal numbers? Well, sort of Here, I use @pola.rs to scan a 10 minute interval and make the value in between same as the lower bound. So minutes between 0 and 10 become 0, minutes between 10 and 20 become 10 etc. #100DaysOfPolars #datasky

When you have timeseries data, @pola.rs has a special type of grouping that lets you be a lot more granular in your grouping. Here, we see the total power usage every 5 hours and 30 minutes. Now that's granular! #100DaysOfPolars #datasky

Sometimes you may have a column identified as a string when it's supposed to be a decimal. Here, I use @pola.rs to convert the data type to decimal. This is different from float type. You can see in the type that the max number of digits after the decimal point is 2. #100DaysOfPolars #datasky

The number of characters in text is not always the same as the number of bytes. Especially when the text contains emojis. @pola.rs helps us here to count characters and bytes in text. #100DaysOfPolars #datasky

You have part numbers for your products, but you want to make sure that they all have 6 characters to maintain same length. Here, we use @pola.rs to add zeros at the end of product numbers with less than 6 characters. #100DaysOfPolars #datasky

You have data in table 2 and table 2. But you want to find values that are in table 1 and not in table 2. Here, we use @pola.rs to get names of students who failed the exam from the list of all students. If you're into math, this is the same as set difference. #100DaysOfPolars #datasky

Most people read a CSV file with bad column names, and then rename those bad column names. Stop doing that. Here, we use @pola.rs to read a CSV file by specifying what we want to call the columns. #100DaysOfPolars #datasky