Navigation

  • index
  • modules |
  • next |
  • previous |
  • pandas 0.15.0 documentation »
  • API Reference »

Table Of Contents

  • What’s New
  • Installation
  • Frequently Asked Questions (FAQ)
  • Package overview
  • 10 Minutes to pandas
  • Tutorials
  • Cookbook
  • Intro to Data Structures
  • Essential Basic Functionality
  • Working with Text Data
  • Options and Settings
  • Indexing and Selecting Data
  • MultiIndex / Advanced Indexing
  • Computational tools
  • Working with missing data
  • Group By: split-apply-combine
  • Merge, join, and concatenate
  • Reshaping and Pivot Tables
  • Time Series / Date functionality
  • Time Deltas
  • Categorical Data
  • Plotting
  • IO Tools (Text, CSV, HDF5, ...)
  • Remote Data Access
  • Enhancing Performance
  • Sparse data structures
  • Caveats and Gotchas
  • rpy2 / R interface
  • pandas Ecosystem
  • Comparison with R / R libraries
  • Comparison with SQL
  • API Reference
  • Contributing to pandas
  • Internals
  • Release Notes

Search

Enter search terms or a module, class or function name.

pandas.core.strings.StringMethods.get_dummies¶

StringMethods.get_dummies(sep='|')¶

Split each string by sep and return a frame of dummy/indicator variables.

Examples

>>> Series(['a|b', 'a', 'a|c']).str.get_dummies()
   a  b  c
0  1  1  0
1  1  0  0
2  1  0  1
>>> pd.Series(['a|b', np.nan, 'a|c']).str.get_dummies()
   a  b  c
0  1  1  0
1  0  0  0
2  1  0  1

See also pd.get_dummies.

Navigation

  • index
  • modules |
  • next |
  • previous |
  • pandas 0.15.0 documentation »
  • API Reference »
© Copyright 2008-2014, the pandas development team. Created using Sphinx 1.1.3.