1

I currently have a dataframe that looks like this:

import numpy as np
import pandas as pd


import pandas as pd
from datetime import datetime
systime = [datetime(2021,1,1,1),datetime(2021,1,1,1),datetime(2021,1,1,1),
                 datetime(2021,1,1,2),datetime(2021,1,1,2),datetime(2021,1,1,2),
                datetime(2021,1,1,3),datetime(2021,1,1,3),datetime(2021,1,1,3)]
phase = ['A','B','C','A','B','C','A','B','C']
value = [10,9,8,20,19,18,30,29,28]
df = pd.DataFrame(list(zip(systime,phase,value)),columns=['SYSTIME','PHASE','VALUE'])
df.head(10)

Screenshot of df.head(10)

I want it to look like this:

enter image description here

Apologize for any weird/uncanny formatting. I don't know how to embed the df.head() I couldn't find what I wanted by googling so I created an account and posted.

Any help would be greatly appreciated.

Shubham Sharma
  • 68,127
  • 6
  • 24
  • 53
Volt
  • 11
  • 2

0 Answers0