Export data from yaml format to Excel
Category Data Science
Category Data Science
Something like:
import yaml
import pandas as pd
data = """
thermal_properties:
- temp: 0.0
free_energy: 10
- temp: 1.0
free_energy: 11
- temp: 2.0
free_energy: 12
"""
x = yaml.load(data)
pd.DataFrame(x['thermal_properties']).to_excel('file.xlsx')
should do the job.
Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.