Selecting a column or multiple columns from a Pandas dataframe is a common task in exploratory data analysis in doing data science/munging/wrangling. In this post, we will see examples of How to select one column from Pandas dataframe? How to select multiple columns from Pandas dataframe? Let us first load Pandas library Let us use […]
How To Change Axis Tick Marks in R?
One of most common things one might do while making plots is to change tiny details of the plot to make them better. Often, one of such adjustments are changing x-axis tick mark label/text on a plot made with ggplot2 in R. Let us use ggplot2 to make plot first and then fix its x-axis […]
How to Select Top N Rows with the Largest Values in a Column(s) in Pandas?
Sometimes, while doing data wrangling, we might need to get a quick look at the top rows with the largest or smallest values in a column. This kind of quick glance at the data reveal interesting information in a dataframe. Pandas dataframe easily enables one to have a quick look at the top rows either […]
How To Write Pandas GroupBy Function using Sparse Matrix?
Pandas group-by function that helps perform the split-apply-combine pattern on data frames is bread and better for data wrangling in Python. Just came across a really cool blogpost titled “Group-by from scratch” by Jake Vanderplas, the author of Python Data Science Handbook. Jake implements multiple ways to implement group-by from scratch. It is a must […]
Happy Pi(e) Day: How To Make Pie Chart in R and Python? (but Never Make it)
Happy Pi(e) Day! Pi Day is for celebrating the mathematical constant ? (pi) and it is on March 14 (3/14). It is also Albert Einstein’s birthday! Today is probably the only day you can think of making a Pie Chart. Pie Chart has been around for a while and notorious for eye-candy but misleading plots. […]


