You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Plotting with the load_over_time function was giving an error due to hardcoded indexes to select columns to be plotted. I suggest changes to make this part dynamic so it will plot only the numerical columns and only when there are numerical columns. Also wrote a comprehensive set of tests for the function with different test cases.
Problem code to reproduce error:
import gridstatus
import plotly.express as px
import pandas as pd
iso = gridstatus.PJM()
df = iso.get_load(date="today")
gridstatus.viz.load_over_time(df, iso="PJM")
The error seen:
`ValueError: Plotly Express cannot process wide-form data with columns of different type.`
Solution
Used pandas column datatype filters to identify numerical columns, then pass these to be plotted as the dependent variables (y)
The text was updated successfully, but these errors were encountered:
Plotting with the load_over_time function was giving an error due to hardcoded indexes to select columns to be plotted. I suggest changes to make this part dynamic so it will plot only the numerical columns and only when there are numerical columns. Also wrote a comprehensive set of tests for the function with different test cases.
Problem code to reproduce error:
The error seen:
Solution
Used pandas column datatype filters to identify numerical columns, then pass these to be plotted as the dependent variables (y)
The text was updated successfully, but these errors were encountered: