Skip to content

Instantly share code, notes, and snippets.

@BryanCutler
Last active May 4, 2021 21:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BryanCutler/c4e248bcce2e7ac2637f5a8ef5da85cc to your computer and use it in GitHub Desktop.
Save BryanCutler/c4e248bcce2e7ac2637f5a8ef5da85cc to your computer and use it in GitHub Desktop.
Text Extensions for Pandas: Tips and Techniques for Extending Pandas, Part 1 Blog
# Reduce the `SpanArray` to a single `Span` covering tokens 2 up to 5.
df["span"].iloc[2:5].sum()
# [6, 20): 'Python and the'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment