Skip to content

Commit

Permalink
Sampling data
Browse files Browse the repository at this point in the history
  • Loading branch information
dolsysmith committed Jan 15, 2025
1 parent 7492ba9 commit b8fd707
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 344 deletions.
5 changes: 3 additions & 2 deletions text-as-data/course_bulletin.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,9 @@
" writer.writeheader()\n",
" for dept, course_dict in cleaned_courses.items():\n",
" if dept in sample_keys:\n",
" for title, desc in course_dict.items():\n",
" writer.writerow(dict(zip(fieldnames, (dept, title, '|'.join(desc)))))"
" for i, (title, desc) in enumerate(course_dict.items()):\n",
" if i < 10:\n",
" writer.writerow(dict(zip(fieldnames, (dept, title, '|'.join(desc)))))"
]
}
],
Expand Down
Loading

0 comments on commit b8fd707

Please sign in to comment.