3.5. Read Clipboard

  • pd.read_clipboard()

3.5.1. SetUp

>>> import pandas as pd
>>>
>>> pd.set_option('display.max_columns', 50)
>>> pd.set_option('display.max_rows', 200)
>>> pd.set_option('display.width', 500)
>>> pd.set_option('display.memory_usage', 'deep')
>>> pd.set_option('display.precision', 4)

3.5.2. Example

firstname  lastname    age
Alice      Apricot     30
Bob        Blackthorn  31
Carol      Corn        32
Dave       Durian      33
Eve        Elderberry  34
Mallory    Melon       15
>>> #
... df = pd.read_clipboard()
... df
  firstname    lastname  age
0     Alice     Apricot   30
1       Bob  Blackthorn   31
2     Carol        Corn   32
3      Dave      Durian   33
4       Eve  Elderberry   34
5   Mallory       Melon   15