Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am marsja on github.
  • I am emarsja (https://keybase.io/emarsja) on keybase.
  • I have a public key ASBhVD0CZETpOwJyic4m3zQqhjW4ySkhGng2eXUY-VginAo

To claim this, I am signing this object:

@marsja
marsja / pandas_loc_example
Created Oct 10, 2019
This gist is for an example code found in the blog post on how to use loc and iloc https://www.marsja.se/how-to-use-iloc-and-loc-for-indexing-and-slicing-pandas-dataframes/
View pandas_loc_example
import pandas as pd
data = 'https://vincentarelbundock.github.io/Rdatasets/csv/DAAG/nasshead.csv'
df = pd.read_csv(data, index_col=1)
df.loc['case']
View anova_numpy_pyvttbl.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@marsja
marsja / data_processing.py
Last active Jul 12, 2016
The following scripts are the ones explained in the blog post on JEPS Bulletin: Python Programming in Psychology – From Data Collection to Analysis (http://blog.efpsa.org/2016/07/12/python-programming-in-psychology-from-data-collection-to-analysis/)
View data_processing.py
import os
from expyriment.misc import data_preprocessing
# Datafolder is where our data is stored. Lets create a string with the path
# to the folder. Note, this script needs to
# be run in the main folder of our flanker script
datafolder = os.getcwd() + os.sep + 'data'
# Imported data_preprocessing from expyriment.misc above makes it possible to
# get our data files (they start "flanker")