title: Creating columns according to date column given in a .csv file
body: <p>I have a .csv file which has 5 columns, out of which there is a column which has a date mentioned in it 'date_value' and I need to change the other 2 columns 'day_of_week' and 'day_of_week_name' according to the date mentioned. Eg:</p>
  
  <pre><code>A
  date_key   date_level    date_value      day_of_week   day_of_week_name
  2010W01     20          01.01.2010           NaN        NaN
  20100102    10          02.01.2010           7.0        Saturday
  2010W02     20          03.01.2010           NaN        NaN
  20100103    10          03.01.2010           1.0        Sunday
  20100104    10          04.01.2010           2.0        Monday
  20100105    10          05.01.2010           3.0        Tuesday
  20100106    10          06.01.2010           4.0        Wednesday
  20100107    10          07.01.2010           5.0        Thursday
  20100108    10          08.01.2010           6.0        Friday
  20100109    10          09.01.2010           7.0        Saturday
  2010W03     20          10.01.2010           NaN        NaN
  </code></pre>
  
  <p>So for example, <strong>day_of_week</strong> would be <strong>1</strong> for <strong>Sunday</strong> according to the date in the <strong>date_value</strong> and so on. Also after every week there is a row which has a <strong>day_of_week</strong> and <strong>day_of_week_name as empty</strong> as it describes the week number which you can see in the <strong>date_key</strong> value <strong>which has a W in it eg - 2010W03</strong>. </p>
  
  <p>how should i get this table to fill the week numner and week name coulmn to fill accordingly with empty values wherever required, i tried sometghing but it does not seem to work.</p>
  
  <pre><code>range1 = [2,3,4,5,6,7,1]
  days = {'2': 'Monday', '3': 'Tuesday', '4': 'Wednesday', '5': 'Thursday', '6': 'Friday', '7': 
  'Saturday', '1': 'Sunday'}
  print(days['2'])
  def change_2018(df):
      for i in df.date_level:
      #print(i)
      if i == 10:
          for k in range1:
              for key, value in days.items():
                  #print(key, value)
                  df.day_of_week = k             
                  df.day_of_week_name = value
  
  
  return df
  
  change_2018(table_2018) 
  </code></pre>
  
  <p>Also I would like to know if there is a any clean way to do this as this function also ran for a long time.</p>