VEDAGI1 commited on
Commit
b968fe6
·
verified ·
1 Parent(s): e9d0d37

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -722,6 +722,7 @@ CRITICAL RULES:
722
  5. **SINGLE JSON OUTPUT:** Print exactly ONE JSON object at the end of your script. Do not print debug statements or multiple JSON objects.
723
  6. **VALID JSON STRUCTURE:** The output MUST be a dictionary/object, not an array or primitive value.
724
  7. **SAFE DATA JOINING:** When joining/merging dataframes or looking up values across dataframes, ALWAYS check if matches exist before accessing with `.iloc[0]`. Use `.merge()` with `how='left'` or check `len(filtered_df) > 0` before accessing rows. Never assume keys will match exactly between dataframes.
 
725
 
726
  --- USER'S SCENARIO ---
727
  {user_scenario}
 
722
  5. **SINGLE JSON OUTPUT:** Print exactly ONE JSON object at the end of your script. Do not print debug statements or multiple JSON objects.
723
  6. **VALID JSON STRUCTURE:** The output MUST be a dictionary/object, not an array or primitive value.
724
  7. **SAFE DATA JOINING:** When joining/merging dataframes or looking up values across dataframes, ALWAYS check if matches exist before accessing with `.iloc[0]`. Use `.merge()` with `how='left'` or check `len(filtered_df) > 0` before accessing rows. Never assume keys will match exactly between dataframes.
725
+ 8. **CONSISTENT COLUMN NAMES:** After aggregation or renaming, always use the NEW column names in subsequent operations. Track renamed columns carefully - if you rename 'Zone' to 'zone', use 'zone' everywhere after.
726
 
727
  --- USER'S SCENARIO ---
728
  {user_scenario}