Python is one of the top/growing programming languages for doing data science. If you are interested in learning Data Science with Python, there are a number of fantastic books and resources available online for free from top data scientists. Here is a list of best books for learning Python for data science. Current list contains […]
3 Examples Using Pivot Table in Pandas
One of the most common tasks in data science is to manipulate the data frame we have to a specific format. For example, sometime we may want to take data frame with fewer columns, say in long format, summarize and convert into a data frame with multiple columns, i.e. a wide data frame. Python Pandas […]
How To Merge/Join DataFrames with Pandas in Python?
One of the most common data science tasks – data munge/data cleaning, is to combine data from multiple sources. When you have the data in tabular forms, Python Pandas offers great functions to merge/join data from multiple data frames. Here we will see example scenarios of common merging operations with simple toy data frames. Let […]
3 Ways To Create a List Repeating an Item
Sometimes, you may want to create a list in Python such that it contains the same element repeated many times. In Python, you can create such a repeat list easily using many approaches. Here are three ways one can create a list with a single element repeated ‘n’ times. 1. How to Create a Repeat […]
Simulating Coin Toss Experiment in Python with NumPy
Tossing a one or more coins is a great way to understand the basics of probability and how to use principles of probability to make inference from data. Let us simulate coin toss experiment with Python. Mathematically, coin toss experiment can be thought of a Binomial experiment, where we have a coin with probability of […]