Check every pandas merge

मॉड्यूल 2: Spreadsheets, Python and BI with AI

कोर्स की रूपरेखा

यह पाठ अभी आपकी भाषा में नहीं है, इसलिए यहाँ अंग्रेज़ी में है।

झटपट जाँच

Guess first, no penalty. An AI's pandas script does a left merge of 1,000 orders with a customer table. The result has 1,450 rows. What happened?

pandas is Python's library for working with tables, and a merge joins two tables on a shared column, like a SQL join. AI scripts merge freely and rarely check the result. The same fan-out that inflates SQL totals happens here.

pandas has two checks built into merge itself:

  • validate checks the keys are unique where you expect. "many_to_one" means many orders, one row per customer. If the customer table has repeats, pandas raises an error instead of quietly repeating rows.
  • indicator=True adds a _merge column saying where each row came from: "both", "left_only" or "right_only". left_only orders found no customer.

In your prompt (the message you send to the AI), ask for both, plus row counts before and after.

इस पाठ का बाकी हिस्सा Learn Pro में है

हर कोर्स का पहला मॉड्यूल फ्री है। Learn Pro से हर कोर्स का हर पाठ खुल जाता है, $10 महीने में। JobRise के सारे टूल फ्री ही रहेंगे।