File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -32,12 +32,12 @@ def validate_gantt(df):
3232 """
3333 if pd and isinstance (df , pd .core .frame .DataFrame ):
3434 # validate that df has all the required keys
35- missing_keys = [ key for key in REQUIRED_GANTT_KEYS if key not in df ]
36- if missing_keys :
37- raise exceptions .PlotlyError (
38- "The columns in your dataframe must include the "
39- "following keys: {0}" .format (", " .join (REQUIRED_GANTT_KEYS ))
40- )
35+ for key in REQUIRED_GANTT_KEYS :
36+ if key not in df :
37+ raise exceptions .PlotlyError (
38+ "The columns in your dataframe must include the "
39+ "following keys: {0}" .format (", " .join (REQUIRED_GANTT_KEYS ))
40+ )
4141
4242 # Pre-fetch columns as DataFrames Series to minimize iloc lookups
4343 # This turns each key into a reference to the Series, for quick access
You can’t perform that action at this time.
0 commit comments