import pandas as pd
from textblob import TextBlob
def analyze_notes(staff_id):
notes = pd.read_sql("SELECT * FROM performance_notes WHERE staff_id = ?", staff_id)
scores = []
for _, note in notes.iterrows():
blob = TextBlob(note['content'])
scores.append({'date': note['date'], 'sentiment': blob.sentiment.polarity, 'note': note['content']})
return pd.DataFrame(scores)