title: how to save a pandas DataFrame to an excel file?
body: <p>I am trying to load data from the web source and save it as a Excel file but not sure how to do it. What should I do?</p>
  
  <pre><code>import requests
  import pandas as pd
  import xmltodict
  
  
  url = "https://www.kstan.ua/sitemap.xml"
  res = requests.get(url)
  raw = xmltodict.parse(res.text)
  
  data = [[r["loc"], r["lastmod"]] for r in raw["urlset"]["url"]]
  print("Number of sitemaps:", len(data))
  df = pd.DataFrame(data, columns=["links", "lastmod"])
  </code></pre>