Hi everyone,
I am trying to run my python script on the local machine and it works fine, but when i deploy thew same workflow on the web portal i can’t see any output i just reads a message saying “Workflow is executed Successfully”
How do i display this standard output on the web portal?
I have also added the extra libraries that i am using in the python code.
Code:
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
Copy input to output
output_table = input_table.copy()
df = output_table
#below code generates the percentage of missing values in each column
col_lst = df.columns.tolist()
temp_1 =
tot_mis_vals = 0
for i in range(len(col_lst)):
missing_vals = df.iloc[:,i].isnull().sum()
tot_mis_vals += missing_vals
temp = (missing_vals / len(df)) * 100
print('Percentage of missing values in ', col_lst[i],'is: ',temp , ‘%’)
temp_1.append(temp)
mis_dict = {‘Columns’:col_lst, ‘Missing value percent’:temp_1}
mis_data = pd.DataFrame(mis_dict)
total_per = tot_mis_vals / (len(df)*len(col_lst)) * 100
print(’\n Total percentage of missing data: ', total_per, “%”)
#below pie chart shows the total percent of missing data in dataset
explode = (0.1, 0)
colors = [’#ff9999’,’#99ff99’]
_ = plt.rcParams.update({‘font.size’: 15})
_ = plt.figure(figsize=(5,5))
_, texts, autotexts = plt.pie([total_per, 100-total_per], labels=[‘Missing’, ‘Not Missing’], shadow=True,
autopct=’%1.1f%%’, startangle=90, pctdistance=0.7, labeldistance=1.1, colors=colors, explode=explode)
for text in texts:
text.set_color(‘grey’)
for autotext in autotexts:
autotext.set_color(‘grey’)
_ = plt.title(‘Total percentage of missing values in the data.’)
plt.show()
Any help would be appreciated.
Thank you.