Programming

Programming related posts

In this category you will find posts that are related to programming and should be interesting for psychologists, cognitive scientists, and neuroscientists. Well, almost every researcher would probably find some of the information useful at some time!

Every research psychologist, cognitive scientist, and neuroscientist, should know how to program.. Knowing how to program and write scripts will make many of a researchers everyday tasks much easier. For instance, instead of going through line after line of raw data you can write a Python script that runs through each cell in each column. Furthermore, you get the possibility to use more advanced, and cutting edge, statistical techniques by using R statistical programming environment.

Another example might be to create experiments using PsychoPy (either by coding using Python or using the drag-and-drop interface) and the cheap and open-source Arduino microcontroller. Also, coding is fun and relaxing!

Pandas Tutorial: Renaming Columns in Pandas Dataframe

Renaming columns in Pandas can be a lifesaver when working with data. Sometimes, we might receive data from a colleague or download it from the internet, and the column names might not be informative or consistent with our analysis. This could lead to confusion and errors in data interpretation, so it’s essential to know how […]

Pandas Tutorial: Renaming Columns in Pandas Dataframe Read More »

reading xlsx files in python

Your Guide to Reading Excel (xlsx) Files in Python

Do you ever spend hours sifting through Excel files, trying to make sense of the data? Openpyxl can help! In this tutorial, we’ve covered everything you need to know about using Openpyxl in Python to read and manipulate Excel files. You will learn to import the necessary modules, set the file path, and read the file and its active sheet. We’ll also dive deeper into manipulating the sheet, including creating a dictionary from an Excel file and reading multiple Excel files in a directory.

By mastering these techniques, you can streamline your data processing workflow and gain valuable insights from your data in a fraction of the time. Whether you are a data analyst or someone looking to make sense of complex data sets, Openpyxl is a powerful tool to help you achieve your goals. So, grab your favorite beverage, fire up your Python IDE, and let’s get started!

Your Guide to Reading Excel (xlsx) Files in Python Read More »

get pandas column names

How to Get the Column Names from a Pandas Dataframe – Print and List

In this short post, you will learn 6 methods to get the column names from Pandas dataframe. One of the nice things about Pandas dataframes is that each column will have a name (i.e., the variables in the dataset). Now, we can use these names to access specific columns by name without having to know which column number it is.

How to Get the Column Names from a Pandas Dataframe – Print and List Read More »

Scroll to Top