title: how to append dataframe only with data to headers in pandas?
body: <p>I have a dataframe with only data . I have hardocded headers in my code. How do I append data to the headers with the data already in data frame.
  data.csv has random data with random columns  and I have to pick only certain records with specific filter which I am doing by iloc and assigning to data frame df_NEW.
  below is my code:</p>
  <pre><code>import pandas as pd
  
  df=pd.read.csv(&quot;C:\\users\\data.csv&quot;)
  headers=['col1','col2','col3','col4','col5']
  df_NEW=df[df.iloc[:,3]=='NEW']       
  df_NEW_final=pd.DataFrame(df_NEW,columns=header)
  </code></pre>
  <p>I know how to append the headers to the data while reading csv. But here, I have to read csv and assign the data based on iloc filter to one data frame and then the result we get from df_NEW, we have to add the columns to this data frame.</p>
  <pre><code>df_NEW_final=pd.DataFrame(df_NEW,columns=header)
  </code></pre>
  <p>above line  gives me only  headers but without data.</p>
  <p>Also, I have 46 headers and only few columns with values   . If data is not present then that column should go as blank.</p>
  <p>How do i do this ?</p>