Quick Reference
Last updated on 2026-08-27 | Edit this page
Keyboard Shortcuts
Running cells:
| Action | Shortcut |
|---|---|
| Run cell | Ctrl+Enter |
| Run cell and move down | Shift+Enter |
| Run all cells | Menu: Run → Run All Cells |
Editing:
| Action | Shortcut |
|---|---|
| New cell below | Ctrl+Shift+B |
| New cell above | Ctrl+Shift+A |
| Convert to code | Escape then Y |
| Convert to markdown | Escape then M |
| Delete cell | Select cell, Escape, D, D |
| Undo | Ctrl+Z |
| Save | Ctrl+S |
Navigation:
| Action | Shortcut |
|---|---|
| Go to line | Ctrl+G |
| Find | Ctrl+F |
| Find and replace | Ctrl+H |
pandas Quick Reference
Loading data:
PYTHON
import pandas as pd
df = pd.read_csv('file.csv')
df = pd.read_excel('file.xlsx')
df = pd.read_json('file.json')
Exploring:
PYTHON
df.head() # First 5 rows
df.tail() # Last 5 rows
df.shape # (rows, columns)
df.info() # Data types
df.describe() # Summary statistics
df['column'].unique() # Unique values
Selecting:
PYTHON
df['column'] # One column
df[['col1', 'col2']] # Multiple columns
df[df['age'] > 25] # Filter
df.iloc[0] # First row
df.loc[df['id'] == 5] # By label
Modifying:
NumPy Quick Reference
Create arrays:
PYTHON
import numpy as np
arr = np.array([1, 2, 3])
arr = np.zeros((3, 4))
arr = np.ones((3, 4))
arr = np.linspace(0, 10, 100)
arr = np.random.randn(100)
Operations:
matplotlib Quick Reference
Basic plot:
PYTHON
import matplotlib.pyplot as plt
x = [1, 2, 3, 4]
y = [1, 4, 2, 3]
plt.plot(x, y)
plt.title('Title')
plt.xlabel('X')
plt.ylabel('Y')
plt.show()
Plot types:
PYTHON
plt.plot(x, y) # Line
plt.scatter(x, y) # Points
plt.hist(data, bins=30) # Histogram
plt.bar(categories, values) # Bar chart
Subplots:
Sagehen HPC Storage
| Path | Size | Backed Up | Purpose |
|---|---|---|---|
/rhome/<myusername> |
100 GB | Yes | Home directory |
/bigdata/lab/<labname> |
1 TB | Yes | Lab shared storage |
/scratch/username |
SSD | No | Fast temporary |
Common Errors
NameError: name ‘x’ is not defined - Cause: Variable not created yet - Fix: Run cell that creates x first
ModuleNotFoundError: No module named ‘numpy’ -
Cause: Package not installed - Fix: pip install numpy in
terminal, then restart kernel
FileNotFoundError: no such file - Cause: Wrong file path - Fix: Use absolute path or verify filename
Cell hangs - Cause: Infinite loop or too much data - Fix: Click stop button or Kernel → Interrupt
Conda Commands
BASH
# List environments
conda env list
# Create environment
conda create --name myenv python=3.11 numpy pandas
# Activate
conda activate myenv
# Install packages
conda install numpy
pip install package
# Export for sharing
conda env export > environment.yml
# Create from export
conda env create -f environment.yml
Resources
- Jupyter docs: https://jupyter.org/documentation
- pandas docs: https://pandas.pydata.org/
- matplotlib docs: https://matplotlib.org/
- OnDemand: https://ondemand.hpc.pomona.edu/
- Sagehen info: https://pomona-college.github.io/
Getting Help
- Email: its-hpc@pomona.edu
- Slack: #hpc-help (Pomona CS Slack)
- Stack Overflow: https://stackoverflow.com/ (search your error)
- Jupyter Issues: https://github.com/jupyter/notebook/issues