title: Beginner stuck on Pandas GroupBy/Series/DF
body: <p>First day working with Pandas and need help figuring out how I'm going to get the min/max for job salaries for this exercise.</p>
  <p>I've managed to group the columns 'job_title' and 'salary_in_usd' and calculate the mean of the latter. Now I want to calculate which job salary mean was highest, and which was lowest.</p>
  <p>I was told that, because my data is now in a Series, I should convert it into a csv then back into a data frame - that way I can access the column for all salary_in_usd and calculate the min/max.</p>
  <p>But for some reason when I convert it to a data frame and run d
  this</p>
  <pre><code>test = df_two.loc[:,['job_title', 'salary_in_usd']]
  
  </code></pre>
  <p>it gives me a Key Error saying &quot;None of [Index(['job_title', 'salary_in_usd'], dtype='object')] are in the [columns]&quot;</p>
  <p>So not sure where I'm messing up here.</p>
  <p>my code:</p>
  <pre><code>check = df.groupby(['job_title', 'salary_in_usd' ])['salary_in_usd'].mean()
  
  df_av = check.to_csv()
  
  with open('check.csv', 'w', newline ='') as f:
      writer = csv.writer(f)
      writer.writerow([df_av])
  
  df_two = pd.read_csv('check.csv')
  
  test = df_two.loc[:,['job_title', 'salary_in_usd']]
  print(test)
  
  </code></pre>