Hi, so I am new to programming and very new to plotly. I have a function in a python module which derives a mean from each column found in a csv file. I would like to plot these means on a basic bar chart with the x axis denoting districts[the columns] and y axis denoting price with different colours. I have read parts of the documentation but it only seems to specify when users input the data manually.
Could anybody help me?
Hey @zarathustra
Could you please give an example of the code you’re working with? Then we can help more easily.
"import pandas as pd
Read CSV data into a Pandas DataFrame
df = pd.read_csv(‘nydataframe copy.csv’)
specified_columns = [‘Upper Manhattan’, ‘Inwood’, ‘Harlem’, ‘Leonx Hill’, ‘Astor Row’, ‘Upper East Side’]
specified_column_means = df[specified_columns].mean()
transformed_means = ((specified_column_means / 1_000_000).round(0) * 1_000_000).round(-5)
print(“Average property price in the following New York Districts:”)
print(transformed_means)"
Blockquote
So this is my code, what I’m actually wanting to do is call the variable ‘transformed_means’ into a separate script that I’m using for the visualisation. I.e using plotly for.