Guest User

Untitled

a guest
Oct 1st, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. import io
  2. import pandas as pd
  3.  
  4. s = """something a b c d message month day year
  5. one 1 2 3.0 4 NaN 10 10 2018
  6. two 5 6 NaN 8 world 10 16 2018
  7. three 9 10 11.0 12 foo 11 15 2018"""
  8.  
  9. print(pd.read_table(io.StringIO(s), sep=' ', parse_dates={'date': ['month', 'day', 'year']}))
Add Comment
Please, Sign In to add comment