Learn about probabilistic programming in this guest post by Osvaldo Martin, a researcher at The National Scientific and Technical Research Council (CONICET). Bayesian Inference Bayesian statistics is conceptually very simple; we have the knowns and the unknowns; we use Bayes’ theorem to condition the latter on the former. If we are lucky, this process will reduce the uncertainty about the unknowns. […]
Author: Erik Marsja
Python Pandas Groupby Tutorial
In this Pandas group by we are going to learn how to organize Pandas dataframes by groups. More specifically, we are going to learn how to group by one and multiple columns. Furthermore, we are going to learn how calculate some basics summary statistics (e.g., mean, median), convert Pandas groupby to dataframe, calculate the percentage of […]
Explorative Data Analysis with Pandas, SciPy, and Seaborn
In this post we are going to learn to explore data using Python, Pandas, and Seaborn. The data we are going to explore is data from a Wikipedia article. In this post we are actually going to learn how to parse data from a URL, exploring this data by grouping it and data visualization. More […]
Pandas Read CSV Tutorial
In this tutorial we will learn how to work with comma separated (CSV) files in Python and Pandas. We will get an overview of how to use Pandas to load CSV to dataframes and how to write dataframes to CSV. In the first section, we will go through, with examples, how to read a CSV […]
How to use Pandas Sample to Select Rows and Columns
In this tutorial we will learn how to use Pandas sample to randomly select rows and columns from a Pandas dataframe. There are some reasons for randomly sample our data; for instance, we may have a very large dataset and want to build our models on a smaller sample of the data. Other examples are […]
Pandas Excel Tutorial: How to Read and Write Excel files
In this tutorial we will learn how to work with Excel files and Python. It will provide an overview of how to use Pandas to load and write these spreadsheets to Excel. In the first section, we will go through, with examples, how to read an Excel file, how to read specific columns from a […]
Data Manipulation with Pandas: A Brief Tutorial
Learn three data manipulation techniques with Pandas in this guest post by Harish Garg, a software developer and data analyst, and the author of Mastering Exploratory Analysis with pandas. Modifying a Pandas DataFrame Using the inplace Parameter In this section, you’ll learn how to modify a DataFrame using the inplace parameter. You’ll first read a real dataset into […]
Repeated Measures ANOVA in Python using Statsmodels
In this brief Python data analysis tutorial we will learn how to carry out a repeated measures ANOVA using Statsmodels. More specifically, we will learn how to use the AnovaRM class from statsmodels anova module. To follow this guide you will need to have Python, Statsmodels, Pandas, and their dependencies installed. One easy way to […]
A Basic Pandas Dataframe Tutorial for Beginners
In this Pandas tutorial we will learn how to work with Pandas dataframes. More specifically, we will learn how to read and write Excel (i.e., xlsx) and CSV files using Pandas. We will also learn how to add a column to Pandas dataframe object, and how to remove a column. Finally, we will also learn […]
PyCharm vs Spyder: a quick comparsion of two Python IDEs
If you have followed my blog you may have noticed that a lot of focus have been put on how to learn programming (particularly in Python). I have also written about Integrated Development Environments (IDEs). IDEs may, in fact, be very useful when learning how to code. When it comes to Python IDEs it may […]
Step-by-step guide for solving the Pyvttbl Float and NoneType error
In this short post I will show you a quick fix for the error “unsupported operand type(s) for +: ‘float’ and ‘NoneType’” with Pyvttbl. In earlier posts I have showed how to carry out ANOVA using Pyvttbl (among other packages. See posts 1, 2, 3, and 3 for ANOVA using pyvttbl). However, Pyvttbl is not […]
PyCharm vs Spyder: a quick comparison of two Python IDEs
In this post, PyCharm vs Spyder will be compared. If you have followed my blog you may have noticed that a lot of focus have been put on how to learn programming (particularly in Python). I have also written about Integrated Development Environments (IDEs). I think that an IDE may, in fact, be very useful […]
How to do Descriptive Statistics in Python using Numpy
In this short post we are going to revisit the topic on how to carry out summary/descriptive statistics in Python. In the previous post, I used Pandas (but also SciPy and Numpy, see Descriptive Statistics Using Python) but now we are only going to use Numpy. The descriptive statistics we are going to calculate are […]
How to do Descriptives Statistics in Python using Numpy
In this short post we are going to revisit the topic on how to carry out summary/descriptive statistics in Python. In the previous post, I used Pandas (but also SciPy and Numpy, see Descriptive Statistics Using Python) but now we are only going to use Numpy. The descriptive statistics we are going to calculate are […]
How to use Python to create an iCalendar file from a Word table
One of the great things with programming is that you can automate things that is boring. As a student I often get schedules in the form of Word documents. I prefer to have all my activities in a calendar and used to manually put every time in a course into my calendar. Today I got […]