Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- import matplotlib.pyplot as plt
- df = pd.DataFrame({
- 'time': ['2018-01-01', '2018-01-02', '2018-01-03'],
- 'place': ['A', 'B', 'C'],
- 'magnitude': [-4, 3, 2],
- })
- print(df)
- df['time'] = pd.to_datetime(df['time'])
- df.plot(x='time', y='magnitude')
- plt.show()
- df.plot(x='magnitude', y='time')
- plt.show()
- # --------------------------------------
- print('wrong data')
- new = pd.DataFrame()
- new.append( df['time'] )
- print(new)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement