Notebook
The Notebook feature lets you write, execute, and visualize code in an interactive environment. Perfect for data analysis, experimentation, and documentation.
Getting Started
Creating a Notebook
- Navigate to Notebook in the sidebar
- Click New Notebook
- Give your notebook a name
- Select a runtime (Python, JavaScript, SQL, etc.)
- Start writing code
Your First Cell
Notebooks are organized into cells. Each cell can contain code that executes independently:
- Click inside the empty cell
- Type your code
- Press
Shift + Enterto execute - See results below the cell
Writing Code
Adding Cells
- Code cells - Write and execute code
- Markdown cells - Add documentation, titles, descriptions
- Query cells - Write SQL queries directly
To add a new cell:
- Click the + button at the bottom of your current cell
- Select cell type
- Start typing
Running Code
Execute code immediately:
- Press
Shift + Enterto run cell and move to next - Press
Ctrl + Enterto run cell and stay - Use keyboard shortcuts shown in the cell toolbar
Supported Languages
- Python (with popular libraries: pandas, numpy, matplotlib, scikit-learn)
- JavaScript / Node.js
- SQL (query your databases)
- Markdown (documentation)
Visualizing Data
Charts and Graphs
Display data visually using built-in charting:
import matplotlib.pyplot as plt
data = [1, 4, 9, 16, 25]
plt.plot(data)
plt.show()
Tables
Data automatically displays as formatted tables:
import pandas as pd
df = pd.DataFrame({
'Name': ['Alice', 'Bob'],
'Score': [95, 87]
})
df
Working with Data
Connecting to Databases
Access your CredVault database clusters:
import credvault
db = credvault.connect(cluster='my-cluster', database='my-db')
results = db.query('SELECT * FROM users')
Importing Files
Upload CSV, JSON, or data files:
- Click Upload in the notebook
- Select your file
- Import data into your notebook
import pandas as pd
df = pd.read_csv('data.csv')
Sharing and Saving
Auto-save
Your notebook saves automatically every 30 seconds.
Sharing with Team
- Click Share button (top right)
- Select team members
- Choose permission level:
- View - Read-only access
- Edit - Can modify and run
- Execute - Can only run, not edit
Exporting
Export your notebook as:
- PDF - For reports and sharing
- HTML - Interactive web version
- Markdown - For documentation
Common Tasks
Data Analysis
Combine code, visualization, and markdown for complete analysis:
# Load data
data = pd.read_csv('sales.csv')
# Analyze
print(f"Total sales: ${data['amount'].sum()}")
# Visualize
data['amount'].plot(kind='bar')
plt.show()
Machine Learning
Train and evaluate models:
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression
X_train, X_test, y_train, y_test = train_test_split(X, y)
model = LogisticRegression()
model.fit(X_train, y_train)
print(f"Accuracy: {model.score(X_test, y_test)}")
Documentation
Mix code and markdown for reproducible documentation:
# Analysis Report
## Overview
This analysis covers Q1 sales trends.
## Key Findings
- 15% increase in revenue
- New market opportunities identified
Tips and Best Practices
- One task per notebook - Keep notebooks focused
- Clear cell names - Add markdown headers for navigation
- Document assumptions - Use markdown cells to explain logic
- Test incrementally - Run cells as you develop
- Clean up output - Remove debugging cells before sharing
Troubleshooting
Cell won't run
- Check for syntax errors (red underline)
- Ensure dependencies are installed
- Try restarting the kernel (⚡ icon)
Need a specific library?
Your notebook has these libraries pre-installed. For others, install directly:
!pip install package-name
Performance is slow
- Reduce dataset size for testing
- Use
.head()instead of loading full dataset - Profile your code to find bottlenecks
Related Topics
- Database Clusters - Query your databases
- AI Assistant - Get coding help
- ML Experiments - Track model performance