import pandas as pd
import olca
import uuid
params = {'mathtext.default': 'regular' }
client = olca.Client(8081)
setup = olca.CalculationSetup()
setup.calculation_type = olca.CalculationType.CONTRIBUTION_ANALYSIS
setup.impact_method = client.find(olca.ImpactMethod, 'ReCiPe 2016 Midpoint (H)')
setup.amount = 1.0
process_descriptor = client.get_descriptors(olca.Process)
process_list = []
id_list = []
des_list = []
for process in process_descriptor:
process_list.append(process.name)
id_list.append(process.id)
des_list.append(process.description)
processes_df = pd.DataFrame(list(zip(process_list,
id_list)),
columns=['name', 'id'])
search_df = processes_df[processes_df['name'].str.contains(r'electricity production, wind, 1-3MW turbine, onshore')]
search_df.reset_index(drop=True, inplace=True)
pd.set_option('display.max_colwidth', None)
search_df['name']