Python

Python programming related stuff

In the posts in this category you will find Python scripts. Python is said to be one of the easiest programming language to learn. Learning one language will also make it easier to learn another, much more advanced, one. As a Bachelor student in the cognitive science programme I got to take Python courses. However, it was not before I started my Ph.D years that I realized how much use I had because I knew some programming.

For a psychology researcher Python might be ideal since it is relatively easy to learn and there is a huge Python community to get help from. How to build experiments using free and open-source tools such as PsychoPy, OpenSesame, Expyriment, and PyEPL is, for instance, something you could find in this category.

2-way ANOVA for repeated measures in Python

Two-way ANOVA for repeated measures using Python

Two-way repeated measures ANOVA in Python can be used to analyze experiments with two within-subject factors. If you are new to repeated measures ANOVA, you may first want to read my tutorials on within-subjects designs using rpy2 (i.e., R from within Python) and repeated measures ANOVA using Pyvttbll. In this tutorial, we will extend the […]

Two-way ANOVA for repeated measures using Python Read More »

Repeated measures ANOVA using Python

Repeated measures ANOVA in Python is useful when you want to analyze data from within-subjects or repeated-measures designs. Although several Python packages now support this analysis, it was not always straightforward to perform using only Python. At the time this tutorial was written, statsmodels did not include repeated measures ANOVA, and one common solution was

Repeated measures ANOVA using Python Read More »

descriptive statistics in python

Descriptive Statistics in Python using Pandas

Descriptive statistics in Python are easy to calculate with Pandas. Whether you want a quick overview of your data or need summary statistics before fitting a statistical model, Pandas includes built-in functions for the most common descriptive measures. In this tutorial, you’ll learn how to calculate descriptive statistics for a Pandas DataFrame and interpret the

Descriptive Statistics in Python using Pandas Read More »

Why Spyder is the Best Python IDE for Science

Spyder is the best Python IDE I have used for data analysis, scientific computing, and general Python development. I’ve been using it for years, and despite trying alternatives such as PyCharm, VS Code, and Rodeo, I keep coming back to Spyder. In this post, I’ll explain why it’s my preferred Python IDE, walk through the features I

Why Spyder is the Best Python IDE for Science Read More »

Spyder IDE a RStudio for Python?

RStudio-like Python IDEs – Rodeo and Spyder

In this post I will discuss two Python Integrated Development Environments (IDE); Rodeo and Spyder. Both Python IDEs might be useful for researchers used to work with R and RStudio (a very good and popular IDE for R) because they offer similar functionalities and graphical interfaces as RStudio. That is, Rodeo and Spyder can both

RStudio-like Python IDEs – Rodeo and Spyder Read More »

TrialHandler – a PsychoPy tutorial

In this tutorial, you will learn how to use the PsychoPy function TrialHandler to create trials and correct responses to your targets in these trials. PsychoPy is an application for creating experiments for Psychology experiments. The application is written in Python, an easy programming language to learn. You can learn more about PsychoPy in my

TrialHandler – a PsychoPy tutorial Read More »

rpy2 tutorial

R from Python – an rpy2 tutorial

This tutorial covers the integration between R and Python using the rpy2 package. Discover how to bridge the gap between these two languages, enabling you to make use of both languages’ strengths for enhanced data analysis and visualization. This rpy2 tutorial guides you through its installation, configuration, and practical usage. Outline In this tutorial, we

R from Python – an rpy2 tutorial Read More »

Scroll to Top