I have a list with string items in it. The list is given below:
mylines = ['Status Name DisplayName', 'Running MSSQL$DEV SQL Server (DEV)', 'Running MSSQL$TEST SQL Server (TEST)', 'Running MSSQLLaunchpad$DEV SQL Server Launchpad (DEV)', 'Running SQLAgent$DEV SQL Server Agent (DEV)', 'Running SQLAgent$TEST SQL Server Agent (TEST)', 'Running SQLBrowser SQL Server Browser', 'Running SQLTELEMETRY$DEV SQL Server CEIP service (DEV)', 'Running SQLTELEMETRY$TEST SQL Server CEIP service (TEST)', 'Running SQLWriter SQL Server VSS Writer']
I want to insert this list into a csv file in such a way that Status Name and DisplayName becomes the column headers and the whole format becomes as below:
I used the following code:
Import pandas as pd
df = pd.DataFrame(mylist)
df.head()
and the following comes up:
which is incorrect as it is only creating a single column instead of the two separate Status Name and DisplayName Column. How can I properly create the dataframe?

