Skip to content

EthanKato/np_sheet_utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

np-sheets

Utilities for reading and writing lab Google Sheets (e.g. Recordings, Subjects) used in Neuropixels/NWB workflows.
Provides high-level helpers with no explicit client initialization — just import and call.


Installation

Install directly from GitHub:

pip install "git+https://github.com/EthanKato/np_sheet_utils@main"

For local development (If you install this way you will automatically get any changes I make):

git clone https://github.com/EthanKato/np_sheet_utils.git
cd np_sheet_utils
pip install -e .

Usage

from np_sheets import sheet_to_df, read_from_recordings, read_from_subjects

# Get a sheet as a df
recordings = sheet_to_df('Recordings')
recordings.head()

subjects = sheet_to_df('Subjects')
subjects.head()

# Read from recordings or subjects
Subject = 'NPXXX'
Block = 'BX'

region = read_from_recordings(Subject, Block, 'Region') # region = 'IFG, STG'
age = read_from_subjects(Subject, 'Age') # age = '31'

The package uses a default Google Sheets ID and lazy client initialization.
Override defaults via environment variables or per-call spreadsheet_id=... argument.



License

MIT

About

An installable package for interacting with the neuropixels management sheet.

Resources

License

Stars

Watchers

Forks

Packages

No packages published