In a classic paper published at 2011, Hadley Wickham asked What do we do when we analyze data? What are common actions and what are common mistakes? And then went ahead to spell it out one of the most common strategies, Split-Apply-Combine, that is used in common data analysis. Intuitively, while solving a big problem, […]
Python Tips
What Does *args and **kwargs Mean in Python?
If you are new Python and saw the use of *args and **kwargs as function arguments and wondered what those *-thingies are, you are not alone. Typically when you write functions, you will have specific number and types of arguments the function can take as input. However, the more Python code you write, you might […]
6 ways to Sort Pandas Dataframe: Pandas Tutorial
Often you want to sort Pandas data frame in a specific way. Typically, one may want to sort pandas data frame based on the values of one or more columns or sort based on the values of row index or row names of pandas dataframe. Pandas data frame has two useful functions sort_values(): to sort […]
How to Get Frequency Counts of a Column in Pandas Dataframe: Pandas Tutorial
Often while working with pandas dataframe you might have a column with categorical variables, string/characters, and you want to find the frequency counts of each unique elements present in the column. Pandas’ value_counts() easily let you get the frequency counts. Let us get started with an example from a real world data set. Load gapminder […]
How to Install Packages from the Jupyter Notebook?
Python package managers, like Anaconda and pip, have made our life much simpler working with Python in different operating systems. However, if you work long enough, you are likely to encounter weird installation problems. One such problem is even if you have installed a package, you won’t be able to import it in the Jupyter […]