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.