[{"data":1,"prerenderedAt":8829},["ShallowReactive",2],{"tutorials-pandas":3,"category-items-pandas":387,"content-/pandas/handling-missing-data":388},[4,21,31,40,49,58,67,78,87,96,105,116,125,134,143,154,163,172,181,192,201,210,219,228,239,248,257,266,276,285,294,303,313,322,331,341,350,359,369,378],{"_path":5,"_dir":6,"_draft":7,"_partial":7,"_locale":6,"title":8,"description":9,"slug":10,"order":11,"isParent":12,"icon":13,"_type":14,"_id":15,"_source":16,"_file":17,"_stem":18,"_extension":19,"children":20,"expanded":12},"/pandas","",false,"Getting Started","Learn the basics of Pandas, Python's powerful data analysis library for working with spreadsheet-like data","getting-started",1,true,"pi pi-play","markdown","content:pandas:1.index.md","content","pandas/1.index.md","pandas/1.index","md",[21,31,40,49,58],{"_path":22,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":24,"description":25,"slug":26,"parentId":5,"order":27,"_type":14,"_id":28,"_source":16,"_file":29,"_stem":30,"_extension":19},"/pandas/what-is-pandas","pandas","What is Pandas","Understand what Pandas is, why it's essential for data analysis, and how it makes working with data simple and powerful","what-is-pandas",2,"content:pandas:2.what-is-pandas.md","pandas/2.what-is-pandas.md","pandas/2.what-is-pandas",{"_path":32,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":33,"description":34,"slug":35,"parentId":5,"order":36,"_type":14,"_id":37,"_source":16,"_file":38,"_stem":39,"_extension":19},"/pandas/installing-pandas","Installing Pandas","Learn how to install Pandas on your computer and verify it's working properly","installing-pandas",3,"content:pandas:3.installing-pandas.md","pandas/3.installing-pandas.md","pandas/3.installing-pandas",{"_path":41,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":42,"description":43,"slug":44,"parentId":5,"order":45,"_type":14,"_id":46,"_source":16,"_file":47,"_stem":48,"_extension":19},"/pandas/your-first-dataframe","Your First DataFrame","Create your first Pandas DataFrame and learn the basics of working with tabular data","your-first-dataframe",4,"content:pandas:4.your-first-dataframe.md","pandas/4.your-first-dataframe.md","pandas/4.your-first-dataframe",{"_path":50,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":51,"description":52,"slug":53,"parentId":5,"order":54,"_type":14,"_id":55,"_source":16,"_file":56,"_stem":57,"_extension":19},"/pandas/series-vs-dataframe","Series vs DataFrame","Understand the difference between Pandas Series and DataFrames, and learn when to use each one","series-vs-dataframe",5,"content:pandas:5.series-vs-dataframe.md","pandas/5.series-vs-dataframe.md","pandas/5.series-vs-dataframe",{"_path":59,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":60,"description":61,"slug":62,"parentId":5,"order":63,"_type":14,"_id":64,"_source":16,"_file":65,"_stem":66,"_extension":19},"/pandas/basic-dataframe-info","Basic DataFrame Info","Learn how to explore and get basic information about your DataFrames to understand your data","basic-dataframe-info",6,"content:pandas:6.basic-dataframe-info.md","pandas/6.basic-dataframe-info.md","pandas/6.basic-dataframe-info",{"_path":68,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":69,"description":70,"slug":71,"order":72,"isParent":12,"icon":73,"_type":14,"_id":74,"_source":16,"_file":75,"_stem":76,"_extension":19,"children":77,"expanded":12},"/pandas/loading-data","Loading Data","Learn how to load data from various sources into Pandas DataFrames","loading-data",7,"pi pi-download","content:pandas:7.loading-data.md","pandas/7.loading-data.md","pandas/7.loading-data",[78,87,96],{"_path":79,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":80,"description":81,"slug":82,"parentId":68,"order":83,"_type":14,"_id":84,"_source":16,"_file":85,"_stem":86,"_extension":19},"/pandas/reading-files","Reading Files (CSV, Excel, JSON)","Learn how to load data from CSV, Excel, and JSON files into Pandas DataFrames","reading-files",8,"content:pandas:8.reading-files.md","pandas/8.reading-files.md","pandas/8.reading-files",{"_path":88,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":89,"description":90,"slug":91,"parentId":68,"order":92,"_type":14,"_id":93,"_source":16,"_file":94,"_stem":95,"_extension":19},"/pandas/loading-from-databases","Loading from Databases","Learn how to connect to databases and load data directly into Pandas DataFrames","loading-from-databases",9,"content:pandas:9.loading-from-databases.md","pandas/9.loading-from-databases.md","pandas/9.loading-from-databases",{"_path":97,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":98,"description":99,"slug":100,"parentId":68,"order":101,"_type":14,"_id":102,"_source":16,"_file":103,"_stem":104,"_extension":19},"/pandas/handling-file-errors","Handling File Errors","Learn how to handle common errors when loading data files and how to troubleshoot loading problems","handling-file-errors",10,"content:pandas:10.handling-file-errors.md","pandas/10.handling-file-errors.md","pandas/10.handling-file-errors",{"_path":106,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":107,"description":108,"slug":109,"order":110,"isParent":12,"icon":111,"_type":14,"_id":112,"_source":16,"_file":113,"_stem":114,"_extension":19,"children":115,"expanded":12},"/pandas/data-exploration","Data Exploration","Learn how to explore and understand your data using Pandas methods and techniques","data-exploration",11,"pi pi-search","content:pandas:11.data-exploration.md","pandas/11.data-exploration.md","pandas/11.data-exploration",[116,125,134],{"_path":117,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":118,"description":119,"slug":120,"parentId":106,"order":121,"_type":14,"_id":122,"_source":16,"_file":123,"_stem":124,"_extension":19},"/pandas/viewing-your-data","Viewing Your Data","Learn different ways to look at and sample your DataFrame data for exploration and understanding","viewing-your-data",12,"content:pandas:12.viewing-your-data.md","pandas/12.viewing-your-data.md","pandas/12.viewing-your-data",{"_path":126,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":127,"description":128,"slug":129,"parentId":106,"order":130,"_type":14,"_id":131,"_source":16,"_file":132,"_stem":133,"_extension":19},"/pandas/data-shape-and-statistics","Data Shape and Statistics","Learn how to understand your DataFrame's size, structure, and get basic statistical summaries","data-shape-and-statistics",13,"content:pandas:13.data-shape-and-statistics.md","pandas/13.data-shape-and-statistics.md","pandas/13.data-shape-and-statistics",{"_path":135,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":136,"description":137,"slug":138,"parentId":106,"order":139,"_type":14,"_id":140,"_source":16,"_file":141,"_stem":142,"_extension":19},"/pandas/column-information-and-data-types","Column Information and Data Types","Learn how to explore individual columns and understand different data types in your DataFrames","column-information-and-data-types",14,"content:pandas:14.column-information-and-data-types.md","pandas/14.column-information-and-data-types.md","pandas/14.column-information-and-data-types",{"_path":144,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":145,"description":146,"slug":147,"order":148,"isParent":12,"icon":149,"_type":14,"_id":150,"_source":16,"_file":151,"_stem":152,"_extension":19,"children":153,"expanded":12},"/pandas/selecting-data","Selecting Data","Learn how to select specific columns, rows, and subsets of data from your DataFrames","selecting-data",15,"pi pi-filter","content:pandas:15.selecting-data.md","pandas/15.selecting-data.md","pandas/15.selecting-data",[154,163,172],{"_path":155,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":156,"description":157,"slug":158,"parentId":144,"order":159,"_type":14,"_id":160,"_source":16,"_file":161,"_stem":162,"_extension":19},"/pandas/selecting-columns-and-rows","Selecting Columns and Rows","Learn how to select specific columns and rows from your DataFrames using basic selection techniques","selecting-columns-and-rows",16,"content:pandas:16.selecting-columns-and-rows.md","pandas/16.selecting-columns-and-rows.md","pandas/16.selecting-columns-and-rows",{"_path":164,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":165,"description":166,"slug":167,"parentId":144,"order":168,"_type":14,"_id":169,"_source":16,"_file":170,"_stem":171,"_extension":19},"/pandas/using-loc-and-iloc","Using loc and iloc","Master precise data selection with label-based (loc) and position-based (iloc) indexing in pandas","using-loc-and-iloc",17,"content:pandas:17.using-loc-and-iloc.md","pandas/17.using-loc-and-iloc.md","pandas/17.using-loc-and-iloc",{"_path":173,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":174,"description":175,"slug":176,"parentId":144,"order":177,"_type":14,"_id":178,"_source":16,"_file":179,"_stem":180,"_extension":19},"/pandas/boolean-and-conditional-selection","Boolean and Conditional Selection","Learn to filter DataFrames using conditions, boolean logic, and multiple criteria for precise data selection","boolean-and-conditional-selection",18,"content:pandas:18.boolean-and-conditional-selection.md","pandas/18.boolean-and-conditional-selection.md","pandas/18.boolean-and-conditional-selection",{"_path":182,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":183,"description":184,"slug":185,"order":186,"isParent":12,"icon":187,"_type":14,"_id":188,"_source":16,"_file":189,"_stem":190,"_extension":19,"children":191,"expanded":12},"/pandas/data-cleaning","Data Cleaning","Learn essential data cleaning techniques to prepare messy data for analysis","data-cleaning",19,"pi pi-wrench","content:pandas:19.data-cleaning.md","pandas/19.data-cleaning.md","pandas/19.data-cleaning",[192,201,210,219],{"_path":193,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":194,"description":195,"slug":196,"parentId":182,"order":197,"_type":14,"_id":198,"_source":16,"_file":199,"_stem":200,"_extension":19},"/pandas/handling-missing-data","Handling Missing Data","Learn to identify, fill, and remove missing values in your DataFrames effectively","handling-missing-data",20,"content:pandas:20.handling-missing-data.md","pandas/20.handling-missing-data.md","pandas/20.handling-missing-data",{"_path":202,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":203,"description":204,"slug":205,"parentId":182,"order":206,"_type":14,"_id":207,"_source":16,"_file":208,"_stem":209,"_extension":19},"/pandas/removing-duplicates","Removing Duplicates","Learn to find and eliminate duplicate rows from your DataFrames to ensure data quality","removing-duplicates",21,"content:pandas:21.removing-duplicates.md","pandas/21.removing-duplicates.md","pandas/21.removing-duplicates",{"_path":211,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":212,"description":213,"slug":214,"parentId":182,"order":215,"_type":14,"_id":216,"_source":16,"_file":217,"_stem":218,"_extension":19},"/pandas/data-type-conversion","Data Type Conversion","Learn to convert data to the right types for proper analysis and calculations","data-type-conversion",22,"content:pandas:22.data-type-conversion.md","pandas/22.data-type-conversion.md","pandas/22.data-type-conversion",{"_path":220,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":221,"description":222,"slug":223,"parentId":182,"order":224,"_type":14,"_id":225,"_source":16,"_file":226,"_stem":227,"_extension":19},"/pandas/string-cleaning-operations","String Cleaning Operations","Learn to clean and standardize text data for consistent analysis using pandas string methods","string-cleaning-operations",23,"content:pandas:23.string-cleaning-operations.md","pandas/23.string-cleaning-operations.md","pandas/23.string-cleaning-operations",{"_path":229,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":230,"description":231,"slug":232,"order":233,"isParent":12,"icon":234,"_type":14,"_id":235,"_source":16,"_file":236,"_stem":237,"_extension":19,"children":238},"/pandas/data-transformation","Data Transformation","Learn how to modify, add, and transform data in your DataFrames for analysis","data-transformation",24,"pi pi-folder","content:pandas:24.data-transformation.md","pandas/24.data-transformation.md","pandas/24.data-transformation",[239,248,257],{"_path":240,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":241,"description":242,"slug":243,"parentId":229,"order":244,"_type":14,"_id":245,"_source":16,"_file":246,"_stem":247,"_extension":19},"/pandas/adding-and-modifying-columns","Adding and Modifying Columns","Learn how to create new columns and update existing ones with calculations and conditional logic","adding-and-modifying-columns",25,"content:pandas:25.adding-and-modifying-columns.md","pandas/25.adding-and-modifying-columns.md","pandas/25.adding-and-modifying-columns",{"_path":249,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":250,"description":251,"slug":252,"parentId":229,"order":253,"_type":14,"_id":254,"_source":16,"_file":255,"_stem":256,"_extension":19},"/pandas/applying-functions","Applying Functions","Use built-in and custom functions to transform your data efficiently","applying-functions",26,"content:pandas:26.applying-functions.md","pandas/26.applying-functions.md","pandas/26.applying-functions",{"_path":258,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":259,"description":260,"slug":261,"parentId":229,"order":262,"_type":14,"_id":263,"_source":16,"_file":264,"_stem":265,"_extension":19},"/pandas/renaming-and-sorting-data","Renaming and Sorting Data","Organize your DataFrame with better column names and logical data ordering","renaming-and-sorting-data",27,"content:pandas:27.renaming-and-sorting-data.md","pandas/27.renaming-and-sorting-data.md","pandas/27.renaming-and-sorting-data",{"_path":267,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":268,"description":269,"slug":270,"order":271,"isParent":12,"icon":234,"_type":14,"_id":272,"_source":16,"_file":273,"_stem":274,"_extension":19,"children":275},"/pandas/grouping-and-aggregation","Grouping and Aggregation","Learn to group data and calculate summary statistics for powerful data analysis","grouping-and-aggregation",28,"content:pandas:28.grouping-and-aggregation.md","pandas/28.grouping-and-aggregation.md","pandas/28.grouping-and-aggregation",[276,285,294],{"_path":277,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":278,"description":279,"slug":280,"parentId":267,"order":281,"_type":14,"_id":282,"_source":16,"_file":283,"_stem":284,"_extension":19},"/pandas/groupby-operations","GroupBy Operations","Learn the fundamentals of splitting data into groups and basic aggregations","groupby-operations",29,"content:pandas:29.groupby-operations.md","pandas/29.groupby-operations.md","pandas/29.groupby-operations",{"_path":286,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":287,"description":288,"slug":289,"parentId":267,"order":290,"_type":14,"_id":291,"_source":16,"_file":292,"_stem":293,"_extension":19},"/pandas/aggregation-functions","Aggregation Functions","Explore different ways to summarize your grouped data with built-in and custom functions","aggregation-functions",30,"content:pandas:30.aggregation-functions.md","pandas/30.aggregation-functions.md","pandas/30.aggregation-functions",{"_path":295,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":296,"description":297,"slug":298,"parentId":267,"order":299,"_type":14,"_id":300,"_source":16,"_file":301,"_stem":302,"_extension":19},"/pandas/pivot-tables-and-cross-tabulation","Pivot Tables and Cross Tabulation","Create powerful summary tables and cross-tabulations for analysis","pivot-tables-and-cross-tabulation",31,"content:pandas:31.pivot-tables-and-cross-tabulation.md","pandas/31.pivot-tables-and-cross-tabulation.md","pandas/31.pivot-tables-and-cross-tabulation",{"_path":304,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":305,"description":306,"slug":307,"order":308,"isParent":12,"icon":234,"_type":14,"_id":309,"_source":16,"_file":310,"_stem":311,"_extension":19,"children":312},"/pandas/combining-data","Combining Data","Learn to combine data from multiple DataFrames for comprehensive analysis","combining-data",32,"content:pandas:32.combining-data.md","pandas/32.combining-data.md","pandas/32.combining-data",[313,322],{"_path":314,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":315,"description":316,"slug":317,"parentId":304,"order":318,"_type":14,"_id":319,"_source":16,"_file":320,"_stem":321,"_extension":19},"/pandas/concatenating-dataframes","Concatenating DataFrames","Learn to stack DataFrames vertically and horizontally for simple data combination","concatenating-dataframes",33,"content:pandas:33.concatenating-dataframes.md","pandas/33.concatenating-dataframes.md","pandas/33.concatenating-dataframes",{"_path":323,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":324,"description":325,"slug":326,"parentId":304,"order":327,"_type":14,"_id":328,"_source":16,"_file":329,"_stem":330,"_extension":19},"/pandas/merging-and-join-operations","Merging and Join Operations","Master different types of joins to combine related data from multiple sources","merging-and-join-operations",34,"content:pandas:34.merging-and-join-operations.md","pandas/34.merging-and-join-operations.md","pandas/34.merging-and-join-operations",{"_path":332,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":333,"description":334,"slug":335,"order":336,"isParent":12,"icon":234,"_type":14,"_id":337,"_source":16,"_file":338,"_stem":339,"_extension":19,"children":340},"/pandas/working-with-dates","Working with Dates","Master date and time operations for time-based analysis and reporting","working-with-dates",35,"content:pandas:35.working-with-dates.md","pandas/35.working-with-dates.md","pandas/35.working-with-dates",[341,350],{"_path":342,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":343,"description":344,"slug":345,"parentId":332,"order":346,"_type":14,"_id":347,"_source":16,"_file":348,"_stem":349,"_extension":19},"/pandas/datetime-operations","DateTime Operations","Learn to convert, manipulate, and extract information from dates and times","datetime-operations",36,"content:pandas:36.datetime-operations.md","pandas/36.datetime-operations.md","pandas/36.datetime-operations",{"_path":351,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":352,"description":353,"slug":354,"parentId":332,"order":355,"_type":14,"_id":356,"_source":16,"_file":357,"_stem":358,"_extension":19},"/pandas/time-series-and-resampling","Time Series and Resampling","Discover how to analyze data over time periods and aggregate by different time intervals","time-series-and-resampling",37,"content:pandas:37.time-series-and-resampling.md","pandas/37.time-series-and-resampling.md","pandas/37.time-series-and-resampling",{"_path":360,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":361,"description":362,"slug":363,"order":364,"isParent":12,"icon":234,"_type":14,"_id":365,"_source":16,"_file":366,"_stem":367,"_extension":19,"children":368},"/pandas/saving-your-work","Saving Your Work","Learn to export your analyzed data to different formats for sharing and reporting","saving-your-work",38,"content:pandas:38.saving-your-work.md","pandas/38.saving-your-work.md","pandas/38.saving-your-work",[369,378],{"_path":370,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":371,"description":372,"slug":373,"parentId":360,"order":374,"_type":14,"_id":375,"_source":16,"_file":376,"_stem":377,"_extension":19},"/pandas/exporting-data","Exporting Data (CSV, Excel, JSON)","Learn to save your DataFrames to common file formats for sharing and reporting","exporting-data",39,"content:pandas:39.exporting-data.md","pandas/39.exporting-data.md","pandas/39.exporting-data",{"_path":379,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":380,"description":381,"slug":382,"parentId":360,"order":383,"_type":14,"_id":384,"_source":16,"_file":385,"_stem":386,"_extension":19},"/pandas/database-export","Database Export","Discover how to save data back to databases for integration with other systems","database-export",40,"content:pandas:40.database-export.md","pandas/40.database-export.md","pandas/40.database-export",[192],{"_path":193,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":194,"description":195,"slug":196,"parentId":182,"order":197,"body":389,"_type":14,"_id":198,"_source":16,"_file":199,"_stem":200,"_extension":19},{"type":390,"children":391,"toc":8816},"root",[392,400,406,523,530,535,1288,1294,1299,1457,1585,1591,1596,2397,2403,2408,3200,3206,3211,4339,4345,4350,5310,5316,5321,5470,6175,6181,6186,7367,7373,7592,7598,7603,8779,8785,8790,8805,8810],{"type":393,"tag":394,"props":395,"children":396},"element","h1",{"id":196},[397],{"type":398,"value":399},"text","🔍 Handling Missing Data",{"type":393,"tag":401,"props":402,"children":403},"p",{},[404],{"type":398,"value":405},"Missing data is like having blank spots in a puzzle - you need to decide whether to fill them in or work around them. Almost every real dataset has missing values, so learning to handle them properly is essential for accurate analysis.",{"type":393,"tag":407,"props":408,"children":412},"info-box",{"emoji":409,"title":410,"type":411},"🔍","What Are Missing Values?","info",[413,422,430,482,490,513],{"type":393,"tag":401,"props":414,"children":415},{},[416],{"type":393,"tag":417,"props":418,"children":419},"strong",{},[420],{"type":398,"value":421},"Missing Values = Empty or Undefined Data",{"type":393,"tag":401,"props":423,"children":424},{},[425],{"type":393,"tag":417,"props":426,"children":427},{},[428],{"type":398,"value":429},"Common Representations:",{"type":393,"tag":431,"props":432,"children":433},"ul",{},[434,447,458,471],{"type":393,"tag":435,"props":436,"children":437},"li",{},[438,445],{"type":393,"tag":439,"props":440,"children":442},"code",{"className":441},[],[443],{"type":398,"value":444},"NaN",{"type":398,"value":446}," (Not a Number) - pandas default",{"type":393,"tag":435,"props":448,"children":449},{},[450,456],{"type":393,"tag":439,"props":451,"children":453},{"className":452},[],[454],{"type":398,"value":455},"None",{"type":398,"value":457}," - Python's null value",{"type":393,"tag":435,"props":459,"children":460},{},[461,463,469],{"type":398,"value":462},"Empty strings ",{"type":393,"tag":439,"props":464,"children":466},{"className":465},[],[467],{"type":398,"value":468},"\"\"",{"type":398,"value":470}," - sometimes used for missing text",{"type":393,"tag":435,"props":472,"children":473},{},[474,480],{"type":393,"tag":439,"props":475,"children":477},{"className":476},[],[478],{"type":398,"value":479},"0",{"type":398,"value":481}," - sometimes used incorrectly for missing numbers",{"type":393,"tag":401,"props":483,"children":484},{},[485],{"type":393,"tag":417,"props":486,"children":487},{},[488],{"type":398,"value":489},"Why Data Goes Missing:",{"type":393,"tag":431,"props":491,"children":492},{},[493,498,503,508],{"type":393,"tag":435,"props":494,"children":495},{},[496],{"type":398,"value":497},"Surveys: People skip questions",{"type":393,"tag":435,"props":499,"children":500},{},[501],{"type":398,"value":502},"Sensors: Equipment failures",{"type":393,"tag":435,"props":504,"children":505},{},[506],{"type":398,"value":507},"Data entry: Human errors or skipped fields",{"type":393,"tag":435,"props":509,"children":510},{},[511],{"type":398,"value":512},"Merging: Data doesn't match between sources",{"type":393,"tag":401,"props":514,"children":515},{},[516,521],{"type":393,"tag":417,"props":517,"children":518},{},[519],{"type":398,"value":520},"Think of it like:",{"type":398,"value":522}," Missing puzzle pieces - you need to decide whether to find replacements or work with what you have!",{"type":393,"tag":524,"props":525,"children":527},"h2",{"id":526},"identifying-missing-data",[528],{"type":398,"value":529},"🔍 Identifying Missing Data",{"type":393,"tag":401,"props":531,"children":532},{},[533],{"type":398,"value":534},"First, you need to find where data is missing:",{"type":393,"tag":536,"props":537,"children":538},"code-try",{},[539],{"type":393,"tag":540,"props":541,"children":545},"pre",{"className":542,"code":543,"language":544,"meta":6,"style":6},"language-python shiki shiki-themes github-light github-dark","import pandas as pd\nimport numpy as np\n\n# Customer survey with missing data\nsurvey = pd.DataFrame({\n    'customer_id': [1, 2, 3, 4, 5],\n    'name': ['Alice', 'Bob', None, 'Diana', 'Eve'],\n    'age': [25, None, 35, 28, 32],\n    'satisfaction': [4, 5, None, 3, 4],\n    'email': ['alice@email.com', 'bob@email.com', '', 'diana@email.com', None]\n})\n\nprint(\"📊 Survey Data:\")\nprint(survey)\nprint()\n\nprint(\"🔍 Finding Missing Data:\")\nprint()\n\nprint(\"1️⃣ Check for missing values:\")\nprint(survey.isnull())\nprint()\n\nprint(\"2️⃣ Count missing values per column:\")\nprint(survey.isnull().sum())\nprint()\n\nprint(\"3️⃣ Total missing values:\")\nprint(f\"Total missing: {survey.isnull().sum().sum()}\")\nprint()\n\nprint(\"4️⃣ Percentage missing per column:\")\nmissing_percent = (survey.isnull().sum() / len(survey)) * 100\nprint(missing_percent.round(1))\n","python",[546],{"type":393,"tag":439,"props":547,"children":548},{"__ignoreMap":6},[549,576,597,605,614,632,694,750,806,858,915,923,930,953,965,977,984,1004,1015,1022,1042,1054,1065,1072,1092,1104,1115,1122,1142,1187,1198,1205,1225,1267],{"type":393,"tag":550,"props":551,"children":553},"span",{"class":552,"line":11},"line",[554,560,566,571],{"type":393,"tag":550,"props":555,"children":557},{"style":556},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[558],{"type":398,"value":559},"import",{"type":393,"tag":550,"props":561,"children":563},{"style":562},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[564],{"type":398,"value":565}," pandas ",{"type":393,"tag":550,"props":567,"children":568},{"style":556},[569],{"type":398,"value":570},"as",{"type":393,"tag":550,"props":572,"children":573},{"style":562},[574],{"type":398,"value":575}," pd\n",{"type":393,"tag":550,"props":577,"children":578},{"class":552,"line":27},[579,583,588,592],{"type":393,"tag":550,"props":580,"children":581},{"style":556},[582],{"type":398,"value":559},{"type":393,"tag":550,"props":584,"children":585},{"style":562},[586],{"type":398,"value":587}," numpy ",{"type":393,"tag":550,"props":589,"children":590},{"style":556},[591],{"type":398,"value":570},{"type":393,"tag":550,"props":593,"children":594},{"style":562},[595],{"type":398,"value":596}," np\n",{"type":393,"tag":550,"props":598,"children":599},{"class":552,"line":36},[600],{"type":393,"tag":550,"props":601,"children":602},{"emptyLinePlaceholder":12},[603],{"type":398,"value":604},"\n",{"type":393,"tag":550,"props":606,"children":607},{"class":552,"line":45},[608],{"type":393,"tag":550,"props":609,"children":611},{"style":610},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[612],{"type":398,"value":613},"# Customer survey with missing data\n",{"type":393,"tag":550,"props":615,"children":616},{"class":552,"line":54},[617,622,627],{"type":393,"tag":550,"props":618,"children":619},{"style":562},[620],{"type":398,"value":621},"survey ",{"type":393,"tag":550,"props":623,"children":624},{"style":556},[625],{"type":398,"value":626},"=",{"type":393,"tag":550,"props":628,"children":629},{"style":562},[630],{"type":398,"value":631}," pd.DataFrame({\n",{"type":393,"tag":550,"props":633,"children":634},{"class":552,"line":63},[635,641,646,652,657,662,666,671,675,680,684,689],{"type":393,"tag":550,"props":636,"children":638},{"style":637},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[639],{"type":398,"value":640},"    'customer_id'",{"type":393,"tag":550,"props":642,"children":643},{"style":562},[644],{"type":398,"value":645},": [",{"type":393,"tag":550,"props":647,"children":649},{"style":648},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[650],{"type":398,"value":651},"1",{"type":393,"tag":550,"props":653,"children":654},{"style":562},[655],{"type":398,"value":656},", ",{"type":393,"tag":550,"props":658,"children":659},{"style":648},[660],{"type":398,"value":661},"2",{"type":393,"tag":550,"props":663,"children":664},{"style":562},[665],{"type":398,"value":656},{"type":393,"tag":550,"props":667,"children":668},{"style":648},[669],{"type":398,"value":670},"3",{"type":393,"tag":550,"props":672,"children":673},{"style":562},[674],{"type":398,"value":656},{"type":393,"tag":550,"props":676,"children":677},{"style":648},[678],{"type":398,"value":679},"4",{"type":393,"tag":550,"props":681,"children":682},{"style":562},[683],{"type":398,"value":656},{"type":393,"tag":550,"props":685,"children":686},{"style":648},[687],{"type":398,"value":688},"5",{"type":393,"tag":550,"props":690,"children":691},{"style":562},[692],{"type":398,"value":693},"],\n",{"type":393,"tag":550,"props":695,"children":696},{"class":552,"line":72},[697,702,706,711,715,720,724,728,732,737,741,746],{"type":393,"tag":550,"props":698,"children":699},{"style":637},[700],{"type":398,"value":701},"    'name'",{"type":393,"tag":550,"props":703,"children":704},{"style":562},[705],{"type":398,"value":645},{"type":393,"tag":550,"props":707,"children":708},{"style":637},[709],{"type":398,"value":710},"'Alice'",{"type":393,"tag":550,"props":712,"children":713},{"style":562},[714],{"type":398,"value":656},{"type":393,"tag":550,"props":716,"children":717},{"style":637},[718],{"type":398,"value":719},"'Bob'",{"type":393,"tag":550,"props":721,"children":722},{"style":562},[723],{"type":398,"value":656},{"type":393,"tag":550,"props":725,"children":726},{"style":648},[727],{"type":398,"value":455},{"type":393,"tag":550,"props":729,"children":730},{"style":562},[731],{"type":398,"value":656},{"type":393,"tag":550,"props":733,"children":734},{"style":637},[735],{"type":398,"value":736},"'Diana'",{"type":393,"tag":550,"props":738,"children":739},{"style":562},[740],{"type":398,"value":656},{"type":393,"tag":550,"props":742,"children":743},{"style":637},[744],{"type":398,"value":745},"'Eve'",{"type":393,"tag":550,"props":747,"children":748},{"style":562},[749],{"type":398,"value":693},{"type":393,"tag":550,"props":751,"children":752},{"class":552,"line":83},[753,758,762,767,771,775,779,784,788,793,797,802],{"type":393,"tag":550,"props":754,"children":755},{"style":637},[756],{"type":398,"value":757},"    'age'",{"type":393,"tag":550,"props":759,"children":760},{"style":562},[761],{"type":398,"value":645},{"type":393,"tag":550,"props":763,"children":764},{"style":648},[765],{"type":398,"value":766},"25",{"type":393,"tag":550,"props":768,"children":769},{"style":562},[770],{"type":398,"value":656},{"type":393,"tag":550,"props":772,"children":773},{"style":648},[774],{"type":398,"value":455},{"type":393,"tag":550,"props":776,"children":777},{"style":562},[778],{"type":398,"value":656},{"type":393,"tag":550,"props":780,"children":781},{"style":648},[782],{"type":398,"value":783},"35",{"type":393,"tag":550,"props":785,"children":786},{"style":562},[787],{"type":398,"value":656},{"type":393,"tag":550,"props":789,"children":790},{"style":648},[791],{"type":398,"value":792},"28",{"type":393,"tag":550,"props":794,"children":795},{"style":562},[796],{"type":398,"value":656},{"type":393,"tag":550,"props":798,"children":799},{"style":648},[800],{"type":398,"value":801},"32",{"type":393,"tag":550,"props":803,"children":804},{"style":562},[805],{"type":398,"value":693},{"type":393,"tag":550,"props":807,"children":808},{"class":552,"line":92},[809,814,818,822,826,830,834,838,842,846,850,854],{"type":393,"tag":550,"props":810,"children":811},{"style":637},[812],{"type":398,"value":813},"    'satisfaction'",{"type":393,"tag":550,"props":815,"children":816},{"style":562},[817],{"type":398,"value":645},{"type":393,"tag":550,"props":819,"children":820},{"style":648},[821],{"type":398,"value":679},{"type":393,"tag":550,"props":823,"children":824},{"style":562},[825],{"type":398,"value":656},{"type":393,"tag":550,"props":827,"children":828},{"style":648},[829],{"type":398,"value":688},{"type":393,"tag":550,"props":831,"children":832},{"style":562},[833],{"type":398,"value":656},{"type":393,"tag":550,"props":835,"children":836},{"style":648},[837],{"type":398,"value":455},{"type":393,"tag":550,"props":839,"children":840},{"style":562},[841],{"type":398,"value":656},{"type":393,"tag":550,"props":843,"children":844},{"style":648},[845],{"type":398,"value":670},{"type":393,"tag":550,"props":847,"children":848},{"style":562},[849],{"type":398,"value":656},{"type":393,"tag":550,"props":851,"children":852},{"style":648},[853],{"type":398,"value":679},{"type":393,"tag":550,"props":855,"children":856},{"style":562},[857],{"type":398,"value":693},{"type":393,"tag":550,"props":859,"children":860},{"class":552,"line":101},[861,866,870,875,879,884,888,893,897,902,906,910],{"type":393,"tag":550,"props":862,"children":863},{"style":637},[864],{"type":398,"value":865},"    'email'",{"type":393,"tag":550,"props":867,"children":868},{"style":562},[869],{"type":398,"value":645},{"type":393,"tag":550,"props":871,"children":872},{"style":637},[873],{"type":398,"value":874},"'alice@email.com'",{"type":393,"tag":550,"props":876,"children":877},{"style":562},[878],{"type":398,"value":656},{"type":393,"tag":550,"props":880,"children":881},{"style":637},[882],{"type":398,"value":883},"'bob@email.com'",{"type":393,"tag":550,"props":885,"children":886},{"style":562},[887],{"type":398,"value":656},{"type":393,"tag":550,"props":889,"children":890},{"style":637},[891],{"type":398,"value":892},"''",{"type":393,"tag":550,"props":894,"children":895},{"style":562},[896],{"type":398,"value":656},{"type":393,"tag":550,"props":898,"children":899},{"style":637},[900],{"type":398,"value":901},"'diana@email.com'",{"type":393,"tag":550,"props":903,"children":904},{"style":562},[905],{"type":398,"value":656},{"type":393,"tag":550,"props":907,"children":908},{"style":648},[909],{"type":398,"value":455},{"type":393,"tag":550,"props":911,"children":912},{"style":562},[913],{"type":398,"value":914},"]\n",{"type":393,"tag":550,"props":916,"children":917},{"class":552,"line":110},[918],{"type":393,"tag":550,"props":919,"children":920},{"style":562},[921],{"type":398,"value":922},"})\n",{"type":393,"tag":550,"props":924,"children":925},{"class":552,"line":121},[926],{"type":393,"tag":550,"props":927,"children":928},{"emptyLinePlaceholder":12},[929],{"type":398,"value":604},{"type":393,"tag":550,"props":931,"children":932},{"class":552,"line":130},[933,938,943,948],{"type":393,"tag":550,"props":934,"children":935},{"style":648},[936],{"type":398,"value":937},"print",{"type":393,"tag":550,"props":939,"children":940},{"style":562},[941],{"type":398,"value":942},"(",{"type":393,"tag":550,"props":944,"children":945},{"style":637},[946],{"type":398,"value":947},"\"📊 Survey Data:\"",{"type":393,"tag":550,"props":949,"children":950},{"style":562},[951],{"type":398,"value":952},")\n",{"type":393,"tag":550,"props":954,"children":955},{"class":552,"line":139},[956,960],{"type":393,"tag":550,"props":957,"children":958},{"style":648},[959],{"type":398,"value":937},{"type":393,"tag":550,"props":961,"children":962},{"style":562},[963],{"type":398,"value":964},"(survey)\n",{"type":393,"tag":550,"props":966,"children":967},{"class":552,"line":148},[968,972],{"type":393,"tag":550,"props":969,"children":970},{"style":648},[971],{"type":398,"value":937},{"type":393,"tag":550,"props":973,"children":974},{"style":562},[975],{"type":398,"value":976},"()\n",{"type":393,"tag":550,"props":978,"children":979},{"class":552,"line":159},[980],{"type":393,"tag":550,"props":981,"children":982},{"emptyLinePlaceholder":12},[983],{"type":398,"value":604},{"type":393,"tag":550,"props":985,"children":986},{"class":552,"line":168},[987,991,995,1000],{"type":393,"tag":550,"props":988,"children":989},{"style":648},[990],{"type":398,"value":937},{"type":393,"tag":550,"props":992,"children":993},{"style":562},[994],{"type":398,"value":942},{"type":393,"tag":550,"props":996,"children":997},{"style":637},[998],{"type":398,"value":999},"\"🔍 Finding Missing Data:\"",{"type":393,"tag":550,"props":1001,"children":1002},{"style":562},[1003],{"type":398,"value":952},{"type":393,"tag":550,"props":1005,"children":1006},{"class":552,"line":177},[1007,1011],{"type":393,"tag":550,"props":1008,"children":1009},{"style":648},[1010],{"type":398,"value":937},{"type":393,"tag":550,"props":1012,"children":1013},{"style":562},[1014],{"type":398,"value":976},{"type":393,"tag":550,"props":1016,"children":1017},{"class":552,"line":186},[1018],{"type":393,"tag":550,"props":1019,"children":1020},{"emptyLinePlaceholder":12},[1021],{"type":398,"value":604},{"type":393,"tag":550,"props":1023,"children":1024},{"class":552,"line":197},[1025,1029,1033,1038],{"type":393,"tag":550,"props":1026,"children":1027},{"style":648},[1028],{"type":398,"value":937},{"type":393,"tag":550,"props":1030,"children":1031},{"style":562},[1032],{"type":398,"value":942},{"type":393,"tag":550,"props":1034,"children":1035},{"style":637},[1036],{"type":398,"value":1037},"\"1️⃣ Check for missing values:\"",{"type":393,"tag":550,"props":1039,"children":1040},{"style":562},[1041],{"type":398,"value":952},{"type":393,"tag":550,"props":1043,"children":1044},{"class":552,"line":206},[1045,1049],{"type":393,"tag":550,"props":1046,"children":1047},{"style":648},[1048],{"type":398,"value":937},{"type":393,"tag":550,"props":1050,"children":1051},{"style":562},[1052],{"type":398,"value":1053},"(survey.isnull())\n",{"type":393,"tag":550,"props":1055,"children":1056},{"class":552,"line":215},[1057,1061],{"type":393,"tag":550,"props":1058,"children":1059},{"style":648},[1060],{"type":398,"value":937},{"type":393,"tag":550,"props":1062,"children":1063},{"style":562},[1064],{"type":398,"value":976},{"type":393,"tag":550,"props":1066,"children":1067},{"class":552,"line":224},[1068],{"type":393,"tag":550,"props":1069,"children":1070},{"emptyLinePlaceholder":12},[1071],{"type":398,"value":604},{"type":393,"tag":550,"props":1073,"children":1074},{"class":552,"line":233},[1075,1079,1083,1088],{"type":393,"tag":550,"props":1076,"children":1077},{"style":648},[1078],{"type":398,"value":937},{"type":393,"tag":550,"props":1080,"children":1081},{"style":562},[1082],{"type":398,"value":942},{"type":393,"tag":550,"props":1084,"children":1085},{"style":637},[1086],{"type":398,"value":1087},"\"2️⃣ Count missing values per column:\"",{"type":393,"tag":550,"props":1089,"children":1090},{"style":562},[1091],{"type":398,"value":952},{"type":393,"tag":550,"props":1093,"children":1094},{"class":552,"line":244},[1095,1099],{"type":393,"tag":550,"props":1096,"children":1097},{"style":648},[1098],{"type":398,"value":937},{"type":393,"tag":550,"props":1100,"children":1101},{"style":562},[1102],{"type":398,"value":1103},"(survey.isnull().sum())\n",{"type":393,"tag":550,"props":1105,"children":1106},{"class":552,"line":253},[1107,1111],{"type":393,"tag":550,"props":1108,"children":1109},{"style":648},[1110],{"type":398,"value":937},{"type":393,"tag":550,"props":1112,"children":1113},{"style":562},[1114],{"type":398,"value":976},{"type":393,"tag":550,"props":1116,"children":1117},{"class":552,"line":262},[1118],{"type":393,"tag":550,"props":1119,"children":1120},{"emptyLinePlaceholder":12},[1121],{"type":398,"value":604},{"type":393,"tag":550,"props":1123,"children":1124},{"class":552,"line":271},[1125,1129,1133,1138],{"type":393,"tag":550,"props":1126,"children":1127},{"style":648},[1128],{"type":398,"value":937},{"type":393,"tag":550,"props":1130,"children":1131},{"style":562},[1132],{"type":398,"value":942},{"type":393,"tag":550,"props":1134,"children":1135},{"style":637},[1136],{"type":398,"value":1137},"\"3️⃣ Total missing values:\"",{"type":393,"tag":550,"props":1139,"children":1140},{"style":562},[1141],{"type":398,"value":952},{"type":393,"tag":550,"props":1143,"children":1144},{"class":552,"line":281},[1145,1149,1153,1158,1163,1168,1173,1178,1183],{"type":393,"tag":550,"props":1146,"children":1147},{"style":648},[1148],{"type":398,"value":937},{"type":393,"tag":550,"props":1150,"children":1151},{"style":562},[1152],{"type":398,"value":942},{"type":393,"tag":550,"props":1154,"children":1155},{"style":556},[1156],{"type":398,"value":1157},"f",{"type":393,"tag":550,"props":1159,"children":1160},{"style":637},[1161],{"type":398,"value":1162},"\"Total missing: ",{"type":393,"tag":550,"props":1164,"children":1165},{"style":648},[1166],{"type":398,"value":1167},"{",{"type":393,"tag":550,"props":1169,"children":1170},{"style":562},[1171],{"type":398,"value":1172},"survey.isnull().sum().sum()",{"type":393,"tag":550,"props":1174,"children":1175},{"style":648},[1176],{"type":398,"value":1177},"}",{"type":393,"tag":550,"props":1179,"children":1180},{"style":637},[1181],{"type":398,"value":1182},"\"",{"type":393,"tag":550,"props":1184,"children":1185},{"style":562},[1186],{"type":398,"value":952},{"type":393,"tag":550,"props":1188,"children":1189},{"class":552,"line":290},[1190,1194],{"type":393,"tag":550,"props":1191,"children":1192},{"style":648},[1193],{"type":398,"value":937},{"type":393,"tag":550,"props":1195,"children":1196},{"style":562},[1197],{"type":398,"value":976},{"type":393,"tag":550,"props":1199,"children":1200},{"class":552,"line":299},[1201],{"type":393,"tag":550,"props":1202,"children":1203},{"emptyLinePlaceholder":12},[1204],{"type":398,"value":604},{"type":393,"tag":550,"props":1206,"children":1207},{"class":552,"line":308},[1208,1212,1216,1221],{"type":393,"tag":550,"props":1209,"children":1210},{"style":648},[1211],{"type":398,"value":937},{"type":393,"tag":550,"props":1213,"children":1214},{"style":562},[1215],{"type":398,"value":942},{"type":393,"tag":550,"props":1217,"children":1218},{"style":637},[1219],{"type":398,"value":1220},"\"4️⃣ Percentage missing per column:\"",{"type":393,"tag":550,"props":1222,"children":1223},{"style":562},[1224],{"type":398,"value":952},{"type":393,"tag":550,"props":1226,"children":1227},{"class":552,"line":318},[1228,1233,1237,1242,1247,1252,1257,1262],{"type":393,"tag":550,"props":1229,"children":1230},{"style":562},[1231],{"type":398,"value":1232},"missing_percent ",{"type":393,"tag":550,"props":1234,"children":1235},{"style":556},[1236],{"type":398,"value":626},{"type":393,"tag":550,"props":1238,"children":1239},{"style":562},[1240],{"type":398,"value":1241}," (survey.isnull().sum() ",{"type":393,"tag":550,"props":1243,"children":1244},{"style":556},[1245],{"type":398,"value":1246},"/",{"type":393,"tag":550,"props":1248,"children":1249},{"style":648},[1250],{"type":398,"value":1251}," len",{"type":393,"tag":550,"props":1253,"children":1254},{"style":562},[1255],{"type":398,"value":1256},"(survey)) ",{"type":393,"tag":550,"props":1258,"children":1259},{"style":556},[1260],{"type":398,"value":1261},"*",{"type":393,"tag":550,"props":1263,"children":1264},{"style":648},[1265],{"type":398,"value":1266}," 100\n",{"type":393,"tag":550,"props":1268,"children":1269},{"class":552,"line":327},[1270,1274,1279,1283],{"type":393,"tag":550,"props":1271,"children":1272},{"style":648},[1273],{"type":398,"value":937},{"type":393,"tag":550,"props":1275,"children":1276},{"style":562},[1277],{"type":398,"value":1278},"(missing_percent.round(",{"type":393,"tag":550,"props":1280,"children":1281},{"style":648},[1282],{"type":398,"value":651},{"type":393,"tag":550,"props":1284,"children":1285},{"style":562},[1286],{"type":398,"value":1287},"))\n",{"type":393,"tag":524,"props":1289,"children":1291},{"id":1290},"missing-data-strategies",[1292],{"type":398,"value":1293},"📋 Missing Data Strategies",{"type":393,"tag":401,"props":1295,"children":1296},{},[1297],{"type":398,"value":1298},"Different approaches for different situations:",{"type":393,"tag":1300,"props":1301,"children":1302},"table",{},[1303,1327],{"type":393,"tag":1304,"props":1305,"children":1306},"thead",{},[1307],{"type":393,"tag":1308,"props":1309,"children":1310},"tr",{},[1311,1317,1322],{"type":393,"tag":1312,"props":1313,"children":1314},"th",{},[1315],{"type":398,"value":1316},"Strategy",{"type":393,"tag":1312,"props":1318,"children":1319},{},[1320],{"type":398,"value":1321},"When to Use",{"type":393,"tag":1312,"props":1323,"children":1324},{},[1325],{"type":398,"value":1326},"Pandas Method",{"type":393,"tag":1328,"props":1329,"children":1330},"tbody",{},[1331,1357,1382,1407,1432],{"type":393,"tag":1308,"props":1332,"children":1333},{},[1334,1343,1348],{"type":393,"tag":1335,"props":1336,"children":1337},"td",{},[1338],{"type":393,"tag":417,"props":1339,"children":1340},{},[1341],{"type":398,"value":1342},"Remove Rows",{"type":393,"tag":1335,"props":1344,"children":1345},{},[1346],{"type":398,"value":1347},"Few missing values, lots of data",{"type":393,"tag":1335,"props":1349,"children":1350},{},[1351],{"type":393,"tag":439,"props":1352,"children":1354},{"className":1353},[],[1355],{"type":398,"value":1356},".dropna()",{"type":393,"tag":1308,"props":1358,"children":1359},{},[1360,1368,1373],{"type":393,"tag":1335,"props":1361,"children":1362},{},[1363],{"type":393,"tag":417,"props":1364,"children":1365},{},[1366],{"type":398,"value":1367},"Remove Columns",{"type":393,"tag":1335,"props":1369,"children":1370},{},[1371],{"type":398,"value":1372},"Column mostly missing, not important",{"type":393,"tag":1335,"props":1374,"children":1375},{},[1376],{"type":393,"tag":439,"props":1377,"children":1379},{"className":1378},[],[1380],{"type":398,"value":1381},"df.drop(columns=['col'])",{"type":393,"tag":1308,"props":1383,"children":1384},{},[1385,1393,1398],{"type":393,"tag":1335,"props":1386,"children":1387},{},[1388],{"type":393,"tag":417,"props":1389,"children":1390},{},[1391],{"type":398,"value":1392},"Fill with Value",{"type":393,"tag":1335,"props":1394,"children":1395},{},[1396],{"type":398,"value":1397},"Clear default makes sense",{"type":393,"tag":1335,"props":1399,"children":1400},{},[1401],{"type":393,"tag":439,"props":1402,"children":1404},{"className":1403},[],[1405],{"type":398,"value":1406},".fillna(value)",{"type":393,"tag":1308,"props":1408,"children":1409},{},[1410,1418,1423],{"type":393,"tag":1335,"props":1411,"children":1412},{},[1413],{"type":393,"tag":417,"props":1414,"children":1415},{},[1416],{"type":398,"value":1417},"Fill Forward/Backward",{"type":393,"tag":1335,"props":1419,"children":1420},{},[1421],{"type":398,"value":1422},"Time series or sequential data",{"type":393,"tag":1335,"props":1424,"children":1425},{},[1426],{"type":393,"tag":439,"props":1427,"children":1429},{"className":1428},[],[1430],{"type":398,"value":1431},".fillna(method='ffill')",{"type":393,"tag":1308,"props":1433,"children":1434},{},[1435,1443,1448],{"type":393,"tag":1335,"props":1436,"children":1437},{},[1438],{"type":393,"tag":417,"props":1439,"children":1440},{},[1441],{"type":398,"value":1442},"Fill with Mean/Median",{"type":393,"tag":1335,"props":1444,"children":1445},{},[1446],{"type":398,"value":1447},"Numeric data, want average value",{"type":393,"tag":1335,"props":1449,"children":1450},{},[1451],{"type":393,"tag":439,"props":1452,"children":1454},{"className":1453},[],[1455],{"type":398,"value":1456},".fillna(df['col'].mean())",{"type":393,"tag":407,"props":1458,"children":1462},{"emoji":1459,"title":1460,"type":1461},"🎯","Choosing the Right Strategy","warning",[1463,1471,1479,1497,1505,1523,1531,1549,1557,1575],{"type":393,"tag":401,"props":1464,"children":1465},{},[1466],{"type":393,"tag":417,"props":1467,"children":1468},{},[1469],{"type":398,"value":1470},"Guidelines for Missing Data:",{"type":393,"tag":401,"props":1472,"children":1473},{},[1474],{"type":393,"tag":417,"props":1475,"children":1476},{},[1477],{"type":398,"value":1478},"Remove Rows When:",{"type":393,"tag":431,"props":1480,"children":1481},{},[1482,1487,1492],{"type":393,"tag":435,"props":1483,"children":1484},{},[1485],{"type":398,"value":1486},"Less than 5% of rows have missing data",{"type":393,"tag":435,"props":1488,"children":1489},{},[1490],{"type":398,"value":1491},"You have plenty of data remaining",{"type":393,"tag":435,"props":1493,"children":1494},{},[1495],{"type":398,"value":1496},"Missing data is completely random",{"type":393,"tag":401,"props":1498,"children":1499},{},[1500],{"type":393,"tag":417,"props":1501,"children":1502},{},[1503],{"type":398,"value":1504},"Fill with Value When:",{"type":393,"tag":431,"props":1506,"children":1507},{},[1508,1513,1518],{"type":393,"tag":435,"props":1509,"children":1510},{},[1511],{"type":398,"value":1512},"You know what the missing value should be",{"type":393,"tag":435,"props":1514,"children":1515},{},[1516],{"type":398,"value":1517},"Zero makes sense (like \"no purchases\" = 0)",{"type":393,"tag":435,"props":1519,"children":1520},{},[1521],{"type":398,"value":1522},"There's a clear default value",{"type":393,"tag":401,"props":1524,"children":1525},{},[1526],{"type":393,"tag":417,"props":1527,"children":1528},{},[1529],{"type":398,"value":1530},"Fill with Mean/Median When:",{"type":393,"tag":431,"props":1532,"children":1533},{},[1534,1539,1544],{"type":393,"tag":435,"props":1535,"children":1536},{},[1537],{"type":398,"value":1538},"Numeric data where average is reasonable",{"type":393,"tag":435,"props":1540,"children":1541},{},[1542],{"type":398,"value":1543},"Don't want to lose rows",{"type":393,"tag":435,"props":1545,"children":1546},{},[1547],{"type":398,"value":1548},"Missing data is random",{"type":393,"tag":401,"props":1550,"children":1551},{},[1552],{"type":393,"tag":417,"props":1553,"children":1554},{},[1555],{"type":398,"value":1556},"Remove Columns When:",{"type":393,"tag":431,"props":1558,"children":1559},{},[1560,1565,1570],{"type":393,"tag":435,"props":1561,"children":1562},{},[1563],{"type":398,"value":1564},"More than 50% of values are missing",{"type":393,"tag":435,"props":1566,"children":1567},{},[1568],{"type":398,"value":1569},"The column isn't important for analysis",{"type":393,"tag":435,"props":1571,"children":1572},{},[1573],{"type":398,"value":1574},"No logical way to fill the values",{"type":393,"tag":401,"props":1576,"children":1577},{},[1578,1583],{"type":393,"tag":417,"props":1579,"children":1580},{},[1581],{"type":398,"value":1582},"Remember:",{"type":398,"value":1584}," Always understand WHY data is missing before deciding how to handle it!",{"type":393,"tag":524,"props":1586,"children":1588},{"id":1587},"️-removing-missing-data",[1589],{"type":398,"value":1590},"🗑️ Removing Missing Data",{"type":393,"tag":401,"props":1592,"children":1593},{},[1594],{"type":398,"value":1595},"Sometimes the simplest solution is to remove missing data:",{"type":393,"tag":536,"props":1597,"children":1598},{},[1599],{"type":393,"tag":540,"props":1600,"children":1602},{"className":542,"code":1601,"language":544,"meta":6,"style":6},"import pandas as pd\nimport numpy as np\n\n# Product reviews with missing data\nreviews = pd.DataFrame({\n    'product': ['Laptop', 'Mouse', 'Keyboard', 'Monitor', 'Tablet'],\n    'rating': [4.5, None, 4.8, 4.2, None],\n    'price': [999, 25, 75, None, 450],\n    'review_count': [150, 80, 200, 95, 30]\n})\n\nprint(\"📊 Product Reviews:\")\nprint(reviews)\nprint()\n\nprint(\"🗑️ Removing Missing Data:\")\nprint()\n\nprint(\"1️⃣ Remove rows with ANY missing values:\")\ncomplete_rows = reviews.dropna()\nprint(complete_rows)\nprint(f\"Rows: {len(reviews)} → {len(complete_rows)}\")\nprint()\n\nprint(\"2️⃣ Remove rows where 'rating' is missing:\")\nhas_rating = reviews.dropna(subset=['rating'])\nprint(has_rating)\nprint(f\"Rows: {len(reviews)} → {len(has_rating)}\")\nprint()\n\nprint(\"3️⃣ Keep rows with at least 3 non-missing values:\")\nmostly_complete = reviews.dropna(thresh=3)\nprint(mostly_complete)\nprint(f\"Rows: {len(reviews)} → {len(mostly_complete)}\")\n",[1603],{"type":393,"tag":439,"props":1604,"children":1605},{"__ignoreMap":6},[1606,1625,1644,1651,1659,1675,1732,1787,1842,1899,1906,1913,1933,1945,1956,1963,1983,1994,2001,2021,2038,2050,2110,2121,2128,2148,2190,2202,2258,2269,2276,2296,2329,2341],{"type":393,"tag":550,"props":1607,"children":1608},{"class":552,"line":11},[1609,1613,1617,1621],{"type":393,"tag":550,"props":1610,"children":1611},{"style":556},[1612],{"type":398,"value":559},{"type":393,"tag":550,"props":1614,"children":1615},{"style":562},[1616],{"type":398,"value":565},{"type":393,"tag":550,"props":1618,"children":1619},{"style":556},[1620],{"type":398,"value":570},{"type":393,"tag":550,"props":1622,"children":1623},{"style":562},[1624],{"type":398,"value":575},{"type":393,"tag":550,"props":1626,"children":1627},{"class":552,"line":27},[1628,1632,1636,1640],{"type":393,"tag":550,"props":1629,"children":1630},{"style":556},[1631],{"type":398,"value":559},{"type":393,"tag":550,"props":1633,"children":1634},{"style":562},[1635],{"type":398,"value":587},{"type":393,"tag":550,"props":1637,"children":1638},{"style":556},[1639],{"type":398,"value":570},{"type":393,"tag":550,"props":1641,"children":1642},{"style":562},[1643],{"type":398,"value":596},{"type":393,"tag":550,"props":1645,"children":1646},{"class":552,"line":36},[1647],{"type":393,"tag":550,"props":1648,"children":1649},{"emptyLinePlaceholder":12},[1650],{"type":398,"value":604},{"type":393,"tag":550,"props":1652,"children":1653},{"class":552,"line":45},[1654],{"type":393,"tag":550,"props":1655,"children":1656},{"style":610},[1657],{"type":398,"value":1658},"# Product reviews with missing data\n",{"type":393,"tag":550,"props":1660,"children":1661},{"class":552,"line":54},[1662,1667,1671],{"type":393,"tag":550,"props":1663,"children":1664},{"style":562},[1665],{"type":398,"value":1666},"reviews ",{"type":393,"tag":550,"props":1668,"children":1669},{"style":556},[1670],{"type":398,"value":626},{"type":393,"tag":550,"props":1672,"children":1673},{"style":562},[1674],{"type":398,"value":631},{"type":393,"tag":550,"props":1676,"children":1677},{"class":552,"line":63},[1678,1683,1687,1692,1696,1701,1705,1710,1714,1719,1723,1728],{"type":393,"tag":550,"props":1679,"children":1680},{"style":637},[1681],{"type":398,"value":1682},"    'product'",{"type":393,"tag":550,"props":1684,"children":1685},{"style":562},[1686],{"type":398,"value":645},{"type":393,"tag":550,"props":1688,"children":1689},{"style":637},[1690],{"type":398,"value":1691},"'Laptop'",{"type":393,"tag":550,"props":1693,"children":1694},{"style":562},[1695],{"type":398,"value":656},{"type":393,"tag":550,"props":1697,"children":1698},{"style":637},[1699],{"type":398,"value":1700},"'Mouse'",{"type":393,"tag":550,"props":1702,"children":1703},{"style":562},[1704],{"type":398,"value":656},{"type":393,"tag":550,"props":1706,"children":1707},{"style":637},[1708],{"type":398,"value":1709},"'Keyboard'",{"type":393,"tag":550,"props":1711,"children":1712},{"style":562},[1713],{"type":398,"value":656},{"type":393,"tag":550,"props":1715,"children":1716},{"style":637},[1717],{"type":398,"value":1718},"'Monitor'",{"type":393,"tag":550,"props":1720,"children":1721},{"style":562},[1722],{"type":398,"value":656},{"type":393,"tag":550,"props":1724,"children":1725},{"style":637},[1726],{"type":398,"value":1727},"'Tablet'",{"type":393,"tag":550,"props":1729,"children":1730},{"style":562},[1731],{"type":398,"value":693},{"type":393,"tag":550,"props":1733,"children":1734},{"class":552,"line":72},[1735,1740,1744,1749,1753,1757,1761,1766,1770,1775,1779,1783],{"type":393,"tag":550,"props":1736,"children":1737},{"style":637},[1738],{"type":398,"value":1739},"    'rating'",{"type":393,"tag":550,"props":1741,"children":1742},{"style":562},[1743],{"type":398,"value":645},{"type":393,"tag":550,"props":1745,"children":1746},{"style":648},[1747],{"type":398,"value":1748},"4.5",{"type":393,"tag":550,"props":1750,"children":1751},{"style":562},[1752],{"type":398,"value":656},{"type":393,"tag":550,"props":1754,"children":1755},{"style":648},[1756],{"type":398,"value":455},{"type":393,"tag":550,"props":1758,"children":1759},{"style":562},[1760],{"type":398,"value":656},{"type":393,"tag":550,"props":1762,"children":1763},{"style":648},[1764],{"type":398,"value":1765},"4.8",{"type":393,"tag":550,"props":1767,"children":1768},{"style":562},[1769],{"type":398,"value":656},{"type":393,"tag":550,"props":1771,"children":1772},{"style":648},[1773],{"type":398,"value":1774},"4.2",{"type":393,"tag":550,"props":1776,"children":1777},{"style":562},[1778],{"type":398,"value":656},{"type":393,"tag":550,"props":1780,"children":1781},{"style":648},[1782],{"type":398,"value":455},{"type":393,"tag":550,"props":1784,"children":1785},{"style":562},[1786],{"type":398,"value":693},{"type":393,"tag":550,"props":1788,"children":1789},{"class":552,"line":83},[1790,1795,1799,1804,1808,1812,1816,1821,1825,1829,1833,1838],{"type":393,"tag":550,"props":1791,"children":1792},{"style":637},[1793],{"type":398,"value":1794},"    'price'",{"type":393,"tag":550,"props":1796,"children":1797},{"style":562},[1798],{"type":398,"value":645},{"type":393,"tag":550,"props":1800,"children":1801},{"style":648},[1802],{"type":398,"value":1803},"999",{"type":393,"tag":550,"props":1805,"children":1806},{"style":562},[1807],{"type":398,"value":656},{"type":393,"tag":550,"props":1809,"children":1810},{"style":648},[1811],{"type":398,"value":766},{"type":393,"tag":550,"props":1813,"children":1814},{"style":562},[1815],{"type":398,"value":656},{"type":393,"tag":550,"props":1817,"children":1818},{"style":648},[1819],{"type":398,"value":1820},"75",{"type":393,"tag":550,"props":1822,"children":1823},{"style":562},[1824],{"type":398,"value":656},{"type":393,"tag":550,"props":1826,"children":1827},{"style":648},[1828],{"type":398,"value":455},{"type":393,"tag":550,"props":1830,"children":1831},{"style":562},[1832],{"type":398,"value":656},{"type":393,"tag":550,"props":1834,"children":1835},{"style":648},[1836],{"type":398,"value":1837},"450",{"type":393,"tag":550,"props":1839,"children":1840},{"style":562},[1841],{"type":398,"value":693},{"type":393,"tag":550,"props":1843,"children":1844},{"class":552,"line":92},[1845,1850,1854,1859,1863,1868,1872,1877,1881,1886,1890,1895],{"type":393,"tag":550,"props":1846,"children":1847},{"style":637},[1848],{"type":398,"value":1849},"    'review_count'",{"type":393,"tag":550,"props":1851,"children":1852},{"style":562},[1853],{"type":398,"value":645},{"type":393,"tag":550,"props":1855,"children":1856},{"style":648},[1857],{"type":398,"value":1858},"150",{"type":393,"tag":550,"props":1860,"children":1861},{"style":562},[1862],{"type":398,"value":656},{"type":393,"tag":550,"props":1864,"children":1865},{"style":648},[1866],{"type":398,"value":1867},"80",{"type":393,"tag":550,"props":1869,"children":1870},{"style":562},[1871],{"type":398,"value":656},{"type":393,"tag":550,"props":1873,"children":1874},{"style":648},[1875],{"type":398,"value":1876},"200",{"type":393,"tag":550,"props":1878,"children":1879},{"style":562},[1880],{"type":398,"value":656},{"type":393,"tag":550,"props":1882,"children":1883},{"style":648},[1884],{"type":398,"value":1885},"95",{"type":393,"tag":550,"props":1887,"children":1888},{"style":562},[1889],{"type":398,"value":656},{"type":393,"tag":550,"props":1891,"children":1892},{"style":648},[1893],{"type":398,"value":1894},"30",{"type":393,"tag":550,"props":1896,"children":1897},{"style":562},[1898],{"type":398,"value":914},{"type":393,"tag":550,"props":1900,"children":1901},{"class":552,"line":101},[1902],{"type":393,"tag":550,"props":1903,"children":1904},{"style":562},[1905],{"type":398,"value":922},{"type":393,"tag":550,"props":1907,"children":1908},{"class":552,"line":110},[1909],{"type":393,"tag":550,"props":1910,"children":1911},{"emptyLinePlaceholder":12},[1912],{"type":398,"value":604},{"type":393,"tag":550,"props":1914,"children":1915},{"class":552,"line":121},[1916,1920,1924,1929],{"type":393,"tag":550,"props":1917,"children":1918},{"style":648},[1919],{"type":398,"value":937},{"type":393,"tag":550,"props":1921,"children":1922},{"style":562},[1923],{"type":398,"value":942},{"type":393,"tag":550,"props":1925,"children":1926},{"style":637},[1927],{"type":398,"value":1928},"\"📊 Product Reviews:\"",{"type":393,"tag":550,"props":1930,"children":1931},{"style":562},[1932],{"type":398,"value":952},{"type":393,"tag":550,"props":1934,"children":1935},{"class":552,"line":130},[1936,1940],{"type":393,"tag":550,"props":1937,"children":1938},{"style":648},[1939],{"type":398,"value":937},{"type":393,"tag":550,"props":1941,"children":1942},{"style":562},[1943],{"type":398,"value":1944},"(reviews)\n",{"type":393,"tag":550,"props":1946,"children":1947},{"class":552,"line":139},[1948,1952],{"type":393,"tag":550,"props":1949,"children":1950},{"style":648},[1951],{"type":398,"value":937},{"type":393,"tag":550,"props":1953,"children":1954},{"style":562},[1955],{"type":398,"value":976},{"type":393,"tag":550,"props":1957,"children":1958},{"class":552,"line":148},[1959],{"type":393,"tag":550,"props":1960,"children":1961},{"emptyLinePlaceholder":12},[1962],{"type":398,"value":604},{"type":393,"tag":550,"props":1964,"children":1965},{"class":552,"line":159},[1966,1970,1974,1979],{"type":393,"tag":550,"props":1967,"children":1968},{"style":648},[1969],{"type":398,"value":937},{"type":393,"tag":550,"props":1971,"children":1972},{"style":562},[1973],{"type":398,"value":942},{"type":393,"tag":550,"props":1975,"children":1976},{"style":637},[1977],{"type":398,"value":1978},"\"🗑️ Removing Missing Data:\"",{"type":393,"tag":550,"props":1980,"children":1981},{"style":562},[1982],{"type":398,"value":952},{"type":393,"tag":550,"props":1984,"children":1985},{"class":552,"line":168},[1986,1990],{"type":393,"tag":550,"props":1987,"children":1988},{"style":648},[1989],{"type":398,"value":937},{"type":393,"tag":550,"props":1991,"children":1992},{"style":562},[1993],{"type":398,"value":976},{"type":393,"tag":550,"props":1995,"children":1996},{"class":552,"line":177},[1997],{"type":393,"tag":550,"props":1998,"children":1999},{"emptyLinePlaceholder":12},[2000],{"type":398,"value":604},{"type":393,"tag":550,"props":2002,"children":2003},{"class":552,"line":186},[2004,2008,2012,2017],{"type":393,"tag":550,"props":2005,"children":2006},{"style":648},[2007],{"type":398,"value":937},{"type":393,"tag":550,"props":2009,"children":2010},{"style":562},[2011],{"type":398,"value":942},{"type":393,"tag":550,"props":2013,"children":2014},{"style":637},[2015],{"type":398,"value":2016},"\"1️⃣ Remove rows with ANY missing values:\"",{"type":393,"tag":550,"props":2018,"children":2019},{"style":562},[2020],{"type":398,"value":952},{"type":393,"tag":550,"props":2022,"children":2023},{"class":552,"line":197},[2024,2029,2033],{"type":393,"tag":550,"props":2025,"children":2026},{"style":562},[2027],{"type":398,"value":2028},"complete_rows ",{"type":393,"tag":550,"props":2030,"children":2031},{"style":556},[2032],{"type":398,"value":626},{"type":393,"tag":550,"props":2034,"children":2035},{"style":562},[2036],{"type":398,"value":2037}," reviews.dropna()\n",{"type":393,"tag":550,"props":2039,"children":2040},{"class":552,"line":206},[2041,2045],{"type":393,"tag":550,"props":2042,"children":2043},{"style":648},[2044],{"type":398,"value":937},{"type":393,"tag":550,"props":2046,"children":2047},{"style":562},[2048],{"type":398,"value":2049},"(complete_rows)\n",{"type":393,"tag":550,"props":2051,"children":2052},{"class":552,"line":215},[2053,2057,2061,2065,2070,2075,2080,2084,2089,2093,2098,2102,2106],{"type":393,"tag":550,"props":2054,"children":2055},{"style":648},[2056],{"type":398,"value":937},{"type":393,"tag":550,"props":2058,"children":2059},{"style":562},[2060],{"type":398,"value":942},{"type":393,"tag":550,"props":2062,"children":2063},{"style":556},[2064],{"type":398,"value":1157},{"type":393,"tag":550,"props":2066,"children":2067},{"style":637},[2068],{"type":398,"value":2069},"\"Rows: ",{"type":393,"tag":550,"props":2071,"children":2072},{"style":648},[2073],{"type":398,"value":2074},"{len",{"type":393,"tag":550,"props":2076,"children":2077},{"style":562},[2078],{"type":398,"value":2079},"(reviews)",{"type":393,"tag":550,"props":2081,"children":2082},{"style":648},[2083],{"type":398,"value":1177},{"type":393,"tag":550,"props":2085,"children":2086},{"style":637},[2087],{"type":398,"value":2088}," → ",{"type":393,"tag":550,"props":2090,"children":2091},{"style":648},[2092],{"type":398,"value":2074},{"type":393,"tag":550,"props":2094,"children":2095},{"style":562},[2096],{"type":398,"value":2097},"(complete_rows)",{"type":393,"tag":550,"props":2099,"children":2100},{"style":648},[2101],{"type":398,"value":1177},{"type":393,"tag":550,"props":2103,"children":2104},{"style":637},[2105],{"type":398,"value":1182},{"type":393,"tag":550,"props":2107,"children":2108},{"style":562},[2109],{"type":398,"value":952},{"type":393,"tag":550,"props":2111,"children":2112},{"class":552,"line":224},[2113,2117],{"type":393,"tag":550,"props":2114,"children":2115},{"style":648},[2116],{"type":398,"value":937},{"type":393,"tag":550,"props":2118,"children":2119},{"style":562},[2120],{"type":398,"value":976},{"type":393,"tag":550,"props":2122,"children":2123},{"class":552,"line":233},[2124],{"type":393,"tag":550,"props":2125,"children":2126},{"emptyLinePlaceholder":12},[2127],{"type":398,"value":604},{"type":393,"tag":550,"props":2129,"children":2130},{"class":552,"line":244},[2131,2135,2139,2144],{"type":393,"tag":550,"props":2132,"children":2133},{"style":648},[2134],{"type":398,"value":937},{"type":393,"tag":550,"props":2136,"children":2137},{"style":562},[2138],{"type":398,"value":942},{"type":393,"tag":550,"props":2140,"children":2141},{"style":637},[2142],{"type":398,"value":2143},"\"2️⃣ Remove rows where 'rating' is missing:\"",{"type":393,"tag":550,"props":2145,"children":2146},{"style":562},[2147],{"type":398,"value":952},{"type":393,"tag":550,"props":2149,"children":2150},{"class":552,"line":253},[2151,2156,2160,2165,2171,2175,2180,2185],{"type":393,"tag":550,"props":2152,"children":2153},{"style":562},[2154],{"type":398,"value":2155},"has_rating ",{"type":393,"tag":550,"props":2157,"children":2158},{"style":556},[2159],{"type":398,"value":626},{"type":393,"tag":550,"props":2161,"children":2162},{"style":562},[2163],{"type":398,"value":2164}," reviews.dropna(",{"type":393,"tag":550,"props":2166,"children":2168},{"style":2167},"--shiki-default:#E36209;--shiki-app-dark-mode:#FFAB70",[2169],{"type":398,"value":2170},"subset",{"type":393,"tag":550,"props":2172,"children":2173},{"style":556},[2174],{"type":398,"value":626},{"type":393,"tag":550,"props":2176,"children":2177},{"style":562},[2178],{"type":398,"value":2179},"[",{"type":393,"tag":550,"props":2181,"children":2182},{"style":637},[2183],{"type":398,"value":2184},"'rating'",{"type":393,"tag":550,"props":2186,"children":2187},{"style":562},[2188],{"type":398,"value":2189},"])\n",{"type":393,"tag":550,"props":2191,"children":2192},{"class":552,"line":262},[2193,2197],{"type":393,"tag":550,"props":2194,"children":2195},{"style":648},[2196],{"type":398,"value":937},{"type":393,"tag":550,"props":2198,"children":2199},{"style":562},[2200],{"type":398,"value":2201},"(has_rating)\n",{"type":393,"tag":550,"props":2203,"children":2204},{"class":552,"line":271},[2205,2209,2213,2217,2221,2225,2229,2233,2237,2241,2246,2250,2254],{"type":393,"tag":550,"props":2206,"children":2207},{"style":648},[2208],{"type":398,"value":937},{"type":393,"tag":550,"props":2210,"children":2211},{"style":562},[2212],{"type":398,"value":942},{"type":393,"tag":550,"props":2214,"children":2215},{"style":556},[2216],{"type":398,"value":1157},{"type":393,"tag":550,"props":2218,"children":2219},{"style":637},[2220],{"type":398,"value":2069},{"type":393,"tag":550,"props":2222,"children":2223},{"style":648},[2224],{"type":398,"value":2074},{"type":393,"tag":550,"props":2226,"children":2227},{"style":562},[2228],{"type":398,"value":2079},{"type":393,"tag":550,"props":2230,"children":2231},{"style":648},[2232],{"type":398,"value":1177},{"type":393,"tag":550,"props":2234,"children":2235},{"style":637},[2236],{"type":398,"value":2088},{"type":393,"tag":550,"props":2238,"children":2239},{"style":648},[2240],{"type":398,"value":2074},{"type":393,"tag":550,"props":2242,"children":2243},{"style":562},[2244],{"type":398,"value":2245},"(has_rating)",{"type":393,"tag":550,"props":2247,"children":2248},{"style":648},[2249],{"type":398,"value":1177},{"type":393,"tag":550,"props":2251,"children":2252},{"style":637},[2253],{"type":398,"value":1182},{"type":393,"tag":550,"props":2255,"children":2256},{"style":562},[2257],{"type":398,"value":952},{"type":393,"tag":550,"props":2259,"children":2260},{"class":552,"line":281},[2261,2265],{"type":393,"tag":550,"props":2262,"children":2263},{"style":648},[2264],{"type":398,"value":937},{"type":393,"tag":550,"props":2266,"children":2267},{"style":562},[2268],{"type":398,"value":976},{"type":393,"tag":550,"props":2270,"children":2271},{"class":552,"line":290},[2272],{"type":393,"tag":550,"props":2273,"children":2274},{"emptyLinePlaceholder":12},[2275],{"type":398,"value":604},{"type":393,"tag":550,"props":2277,"children":2278},{"class":552,"line":299},[2279,2283,2287,2292],{"type":393,"tag":550,"props":2280,"children":2281},{"style":648},[2282],{"type":398,"value":937},{"type":393,"tag":550,"props":2284,"children":2285},{"style":562},[2286],{"type":398,"value":942},{"type":393,"tag":550,"props":2288,"children":2289},{"style":637},[2290],{"type":398,"value":2291},"\"3️⃣ Keep rows with at least 3 non-missing values:\"",{"type":393,"tag":550,"props":2293,"children":2294},{"style":562},[2295],{"type":398,"value":952},{"type":393,"tag":550,"props":2297,"children":2298},{"class":552,"line":308},[2299,2304,2308,2312,2317,2321,2325],{"type":393,"tag":550,"props":2300,"children":2301},{"style":562},[2302],{"type":398,"value":2303},"mostly_complete ",{"type":393,"tag":550,"props":2305,"children":2306},{"style":556},[2307],{"type":398,"value":626},{"type":393,"tag":550,"props":2309,"children":2310},{"style":562},[2311],{"type":398,"value":2164},{"type":393,"tag":550,"props":2313,"children":2314},{"style":2167},[2315],{"type":398,"value":2316},"thresh",{"type":393,"tag":550,"props":2318,"children":2319},{"style":556},[2320],{"type":398,"value":626},{"type":393,"tag":550,"props":2322,"children":2323},{"style":648},[2324],{"type":398,"value":670},{"type":393,"tag":550,"props":2326,"children":2327},{"style":562},[2328],{"type":398,"value":952},{"type":393,"tag":550,"props":2330,"children":2331},{"class":552,"line":318},[2332,2336],{"type":393,"tag":550,"props":2333,"children":2334},{"style":648},[2335],{"type":398,"value":937},{"type":393,"tag":550,"props":2337,"children":2338},{"style":562},[2339],{"type":398,"value":2340},"(mostly_complete)\n",{"type":393,"tag":550,"props":2342,"children":2343},{"class":552,"line":327},[2344,2348,2352,2356,2360,2364,2368,2372,2376,2380,2385,2389,2393],{"type":393,"tag":550,"props":2345,"children":2346},{"style":648},[2347],{"type":398,"value":937},{"type":393,"tag":550,"props":2349,"children":2350},{"style":562},[2351],{"type":398,"value":942},{"type":393,"tag":550,"props":2353,"children":2354},{"style":556},[2355],{"type":398,"value":1157},{"type":393,"tag":550,"props":2357,"children":2358},{"style":637},[2359],{"type":398,"value":2069},{"type":393,"tag":550,"props":2361,"children":2362},{"style":648},[2363],{"type":398,"value":2074},{"type":393,"tag":550,"props":2365,"children":2366},{"style":562},[2367],{"type":398,"value":2079},{"type":393,"tag":550,"props":2369,"children":2370},{"style":648},[2371],{"type":398,"value":1177},{"type":393,"tag":550,"props":2373,"children":2374},{"style":637},[2375],{"type":398,"value":2088},{"type":393,"tag":550,"props":2377,"children":2378},{"style":648},[2379],{"type":398,"value":2074},{"type":393,"tag":550,"props":2381,"children":2382},{"style":562},[2383],{"type":398,"value":2384},"(mostly_complete)",{"type":393,"tag":550,"props":2386,"children":2387},{"style":648},[2388],{"type":398,"value":1177},{"type":393,"tag":550,"props":2390,"children":2391},{"style":637},[2392],{"type":398,"value":1182},{"type":393,"tag":550,"props":2394,"children":2395},{"style":562},[2396],{"type":398,"value":952},{"type":393,"tag":524,"props":2398,"children":2400},{"id":2399},"filling-missing-data",[2401],{"type":398,"value":2402},"🔄 Filling Missing Data",{"type":393,"tag":401,"props":2404,"children":2405},{},[2406],{"type":398,"value":2407},"Replace missing values with meaningful substitutes:",{"type":393,"tag":536,"props":2409,"children":2410},{},[2411],{"type":393,"tag":540,"props":2412,"children":2414},{"className":542,"code":2413,"language":544,"meta":6,"style":6},"import pandas as pd\nimport numpy as np\n\n# Sales data with missing values\nsales = pd.DataFrame({\n    'month': ['Jan', 'Feb', 'Mar', 'Apr', 'May'],\n    'revenue': [10000, None, 15000, 12000, None],\n    'region': ['North', 'North', None, 'South', 'South'],\n    'sales_rep': ['Alice', 'Bob', 'Alice', None, 'Charlie']\n})\n\nprint(\"📊 Sales Data:\")\nprint(sales)\nprint()\n\nprint(\"🔄 Filling Missing Values:\")\nprint()\n\nprint(\"1️⃣ Fill revenue with 0 (no sales):\")\nfilled_zero = sales.copy()\nfilled_zero['revenue'] = filled_zero['revenue'].fillna(0)\nprint(filled_zero)\nprint()\n\nprint(\"2️⃣ Fill revenue with average:\")\nfilled_mean = sales.copy()\navg_revenue = sales['revenue'].mean()\nfilled_mean['revenue'] = filled_mean['revenue'].fillna(avg_revenue)\nprint(filled_mean)\nprint(f\"Average revenue used: ${avg_revenue:,.0f}\")\nprint()\n\nprint(\"3️⃣ Fill region with 'Unknown':\")\nfilled_text = sales.copy()\nfilled_text['region'] = filled_text['region'].fillna('Unknown')\nprint(filled_text[['month', 'region']])\n",[2415],{"type":393,"tag":439,"props":2416,"children":2417},{"__ignoreMap":6},[2418,2437,2456,2463,2471,2487,2544,2599,2653,2706,2713,2720,2740,2752,2763,2770,2790,2801,2808,2828,2845,2889,2901,2912,2919,2939,2955,2981,3015,3027,3073,3084,3091,3111,3127,3170],{"type":393,"tag":550,"props":2419,"children":2420},{"class":552,"line":11},[2421,2425,2429,2433],{"type":393,"tag":550,"props":2422,"children":2423},{"style":556},[2424],{"type":398,"value":559},{"type":393,"tag":550,"props":2426,"children":2427},{"style":562},[2428],{"type":398,"value":565},{"type":393,"tag":550,"props":2430,"children":2431},{"style":556},[2432],{"type":398,"value":570},{"type":393,"tag":550,"props":2434,"children":2435},{"style":562},[2436],{"type":398,"value":575},{"type":393,"tag":550,"props":2438,"children":2439},{"class":552,"line":27},[2440,2444,2448,2452],{"type":393,"tag":550,"props":2441,"children":2442},{"style":556},[2443],{"type":398,"value":559},{"type":393,"tag":550,"props":2445,"children":2446},{"style":562},[2447],{"type":398,"value":587},{"type":393,"tag":550,"props":2449,"children":2450},{"style":556},[2451],{"type":398,"value":570},{"type":393,"tag":550,"props":2453,"children":2454},{"style":562},[2455],{"type":398,"value":596},{"type":393,"tag":550,"props":2457,"children":2458},{"class":552,"line":36},[2459],{"type":393,"tag":550,"props":2460,"children":2461},{"emptyLinePlaceholder":12},[2462],{"type":398,"value":604},{"type":393,"tag":550,"props":2464,"children":2465},{"class":552,"line":45},[2466],{"type":393,"tag":550,"props":2467,"children":2468},{"style":610},[2469],{"type":398,"value":2470},"# Sales data with missing values\n",{"type":393,"tag":550,"props":2472,"children":2473},{"class":552,"line":54},[2474,2479,2483],{"type":393,"tag":550,"props":2475,"children":2476},{"style":562},[2477],{"type":398,"value":2478},"sales ",{"type":393,"tag":550,"props":2480,"children":2481},{"style":556},[2482],{"type":398,"value":626},{"type":393,"tag":550,"props":2484,"children":2485},{"style":562},[2486],{"type":398,"value":631},{"type":393,"tag":550,"props":2488,"children":2489},{"class":552,"line":63},[2490,2495,2499,2504,2508,2513,2517,2522,2526,2531,2535,2540],{"type":393,"tag":550,"props":2491,"children":2492},{"style":637},[2493],{"type":398,"value":2494},"    'month'",{"type":393,"tag":550,"props":2496,"children":2497},{"style":562},[2498],{"type":398,"value":645},{"type":393,"tag":550,"props":2500,"children":2501},{"style":637},[2502],{"type":398,"value":2503},"'Jan'",{"type":393,"tag":550,"props":2505,"children":2506},{"style":562},[2507],{"type":398,"value":656},{"type":393,"tag":550,"props":2509,"children":2510},{"style":637},[2511],{"type":398,"value":2512},"'Feb'",{"type":393,"tag":550,"props":2514,"children":2515},{"style":562},[2516],{"type":398,"value":656},{"type":393,"tag":550,"props":2518,"children":2519},{"style":637},[2520],{"type":398,"value":2521},"'Mar'",{"type":393,"tag":550,"props":2523,"children":2524},{"style":562},[2525],{"type":398,"value":656},{"type":393,"tag":550,"props":2527,"children":2528},{"style":637},[2529],{"type":398,"value":2530},"'Apr'",{"type":393,"tag":550,"props":2532,"children":2533},{"style":562},[2534],{"type":398,"value":656},{"type":393,"tag":550,"props":2536,"children":2537},{"style":637},[2538],{"type":398,"value":2539},"'May'",{"type":393,"tag":550,"props":2541,"children":2542},{"style":562},[2543],{"type":398,"value":693},{"type":393,"tag":550,"props":2545,"children":2546},{"class":552,"line":72},[2547,2552,2556,2561,2565,2569,2573,2578,2582,2587,2591,2595],{"type":393,"tag":550,"props":2548,"children":2549},{"style":637},[2550],{"type":398,"value":2551},"    'revenue'",{"type":393,"tag":550,"props":2553,"children":2554},{"style":562},[2555],{"type":398,"value":645},{"type":393,"tag":550,"props":2557,"children":2558},{"style":648},[2559],{"type":398,"value":2560},"10000",{"type":393,"tag":550,"props":2562,"children":2563},{"style":562},[2564],{"type":398,"value":656},{"type":393,"tag":550,"props":2566,"children":2567},{"style":648},[2568],{"type":398,"value":455},{"type":393,"tag":550,"props":2570,"children":2571},{"style":562},[2572],{"type":398,"value":656},{"type":393,"tag":550,"props":2574,"children":2575},{"style":648},[2576],{"type":398,"value":2577},"15000",{"type":393,"tag":550,"props":2579,"children":2580},{"style":562},[2581],{"type":398,"value":656},{"type":393,"tag":550,"props":2583,"children":2584},{"style":648},[2585],{"type":398,"value":2586},"12000",{"type":393,"tag":550,"props":2588,"children":2589},{"style":562},[2590],{"type":398,"value":656},{"type":393,"tag":550,"props":2592,"children":2593},{"style":648},[2594],{"type":398,"value":455},{"type":393,"tag":550,"props":2596,"children":2597},{"style":562},[2598],{"type":398,"value":693},{"type":393,"tag":550,"props":2600,"children":2601},{"class":552,"line":83},[2602,2607,2611,2616,2620,2624,2628,2632,2636,2641,2645,2649],{"type":393,"tag":550,"props":2603,"children":2604},{"style":637},[2605],{"type":398,"value":2606},"    'region'",{"type":393,"tag":550,"props":2608,"children":2609},{"style":562},[2610],{"type":398,"value":645},{"type":393,"tag":550,"props":2612,"children":2613},{"style":637},[2614],{"type":398,"value":2615},"'North'",{"type":393,"tag":550,"props":2617,"children":2618},{"style":562},[2619],{"type":398,"value":656},{"type":393,"tag":550,"props":2621,"children":2622},{"style":637},[2623],{"type":398,"value":2615},{"type":393,"tag":550,"props":2625,"children":2626},{"style":562},[2627],{"type":398,"value":656},{"type":393,"tag":550,"props":2629,"children":2630},{"style":648},[2631],{"type":398,"value":455},{"type":393,"tag":550,"props":2633,"children":2634},{"style":562},[2635],{"type":398,"value":656},{"type":393,"tag":550,"props":2637,"children":2638},{"style":637},[2639],{"type":398,"value":2640},"'South'",{"type":393,"tag":550,"props":2642,"children":2643},{"style":562},[2644],{"type":398,"value":656},{"type":393,"tag":550,"props":2646,"children":2647},{"style":637},[2648],{"type":398,"value":2640},{"type":393,"tag":550,"props":2650,"children":2651},{"style":562},[2652],{"type":398,"value":693},{"type":393,"tag":550,"props":2654,"children":2655},{"class":552,"line":92},[2656,2661,2665,2669,2673,2677,2681,2685,2689,2693,2697,2702],{"type":393,"tag":550,"props":2657,"children":2658},{"style":637},[2659],{"type":398,"value":2660},"    'sales_rep'",{"type":393,"tag":550,"props":2662,"children":2663},{"style":562},[2664],{"type":398,"value":645},{"type":393,"tag":550,"props":2666,"children":2667},{"style":637},[2668],{"type":398,"value":710},{"type":393,"tag":550,"props":2670,"children":2671},{"style":562},[2672],{"type":398,"value":656},{"type":393,"tag":550,"props":2674,"children":2675},{"style":637},[2676],{"type":398,"value":719},{"type":393,"tag":550,"props":2678,"children":2679},{"style":562},[2680],{"type":398,"value":656},{"type":393,"tag":550,"props":2682,"children":2683},{"style":637},[2684],{"type":398,"value":710},{"type":393,"tag":550,"props":2686,"children":2687},{"style":562},[2688],{"type":398,"value":656},{"type":393,"tag":550,"props":2690,"children":2691},{"style":648},[2692],{"type":398,"value":455},{"type":393,"tag":550,"props":2694,"children":2695},{"style":562},[2696],{"type":398,"value":656},{"type":393,"tag":550,"props":2698,"children":2699},{"style":637},[2700],{"type":398,"value":2701},"'Charlie'",{"type":393,"tag":550,"props":2703,"children":2704},{"style":562},[2705],{"type":398,"value":914},{"type":393,"tag":550,"props":2707,"children":2708},{"class":552,"line":101},[2709],{"type":393,"tag":550,"props":2710,"children":2711},{"style":562},[2712],{"type":398,"value":922},{"type":393,"tag":550,"props":2714,"children":2715},{"class":552,"line":110},[2716],{"type":393,"tag":550,"props":2717,"children":2718},{"emptyLinePlaceholder":12},[2719],{"type":398,"value":604},{"type":393,"tag":550,"props":2721,"children":2722},{"class":552,"line":121},[2723,2727,2731,2736],{"type":393,"tag":550,"props":2724,"children":2725},{"style":648},[2726],{"type":398,"value":937},{"type":393,"tag":550,"props":2728,"children":2729},{"style":562},[2730],{"type":398,"value":942},{"type":393,"tag":550,"props":2732,"children":2733},{"style":637},[2734],{"type":398,"value":2735},"\"📊 Sales Data:\"",{"type":393,"tag":550,"props":2737,"children":2738},{"style":562},[2739],{"type":398,"value":952},{"type":393,"tag":550,"props":2741,"children":2742},{"class":552,"line":130},[2743,2747],{"type":393,"tag":550,"props":2744,"children":2745},{"style":648},[2746],{"type":398,"value":937},{"type":393,"tag":550,"props":2748,"children":2749},{"style":562},[2750],{"type":398,"value":2751},"(sales)\n",{"type":393,"tag":550,"props":2753,"children":2754},{"class":552,"line":139},[2755,2759],{"type":393,"tag":550,"props":2756,"children":2757},{"style":648},[2758],{"type":398,"value":937},{"type":393,"tag":550,"props":2760,"children":2761},{"style":562},[2762],{"type":398,"value":976},{"type":393,"tag":550,"props":2764,"children":2765},{"class":552,"line":148},[2766],{"type":393,"tag":550,"props":2767,"children":2768},{"emptyLinePlaceholder":12},[2769],{"type":398,"value":604},{"type":393,"tag":550,"props":2771,"children":2772},{"class":552,"line":159},[2773,2777,2781,2786],{"type":393,"tag":550,"props":2774,"children":2775},{"style":648},[2776],{"type":398,"value":937},{"type":393,"tag":550,"props":2778,"children":2779},{"style":562},[2780],{"type":398,"value":942},{"type":393,"tag":550,"props":2782,"children":2783},{"style":637},[2784],{"type":398,"value":2785},"\"🔄 Filling Missing Values:\"",{"type":393,"tag":550,"props":2787,"children":2788},{"style":562},[2789],{"type":398,"value":952},{"type":393,"tag":550,"props":2791,"children":2792},{"class":552,"line":168},[2793,2797],{"type":393,"tag":550,"props":2794,"children":2795},{"style":648},[2796],{"type":398,"value":937},{"type":393,"tag":550,"props":2798,"children":2799},{"style":562},[2800],{"type":398,"value":976},{"type":393,"tag":550,"props":2802,"children":2803},{"class":552,"line":177},[2804],{"type":393,"tag":550,"props":2805,"children":2806},{"emptyLinePlaceholder":12},[2807],{"type":398,"value":604},{"type":393,"tag":550,"props":2809,"children":2810},{"class":552,"line":186},[2811,2815,2819,2824],{"type":393,"tag":550,"props":2812,"children":2813},{"style":648},[2814],{"type":398,"value":937},{"type":393,"tag":550,"props":2816,"children":2817},{"style":562},[2818],{"type":398,"value":942},{"type":393,"tag":550,"props":2820,"children":2821},{"style":637},[2822],{"type":398,"value":2823},"\"1️⃣ Fill revenue with 0 (no sales):\"",{"type":393,"tag":550,"props":2825,"children":2826},{"style":562},[2827],{"type":398,"value":952},{"type":393,"tag":550,"props":2829,"children":2830},{"class":552,"line":197},[2831,2836,2840],{"type":393,"tag":550,"props":2832,"children":2833},{"style":562},[2834],{"type":398,"value":2835},"filled_zero ",{"type":393,"tag":550,"props":2837,"children":2838},{"style":556},[2839],{"type":398,"value":626},{"type":393,"tag":550,"props":2841,"children":2842},{"style":562},[2843],{"type":398,"value":2844}," sales.copy()\n",{"type":393,"tag":550,"props":2846,"children":2847},{"class":552,"line":206},[2848,2853,2858,2863,2867,2872,2876,2881,2885],{"type":393,"tag":550,"props":2849,"children":2850},{"style":562},[2851],{"type":398,"value":2852},"filled_zero[",{"type":393,"tag":550,"props":2854,"children":2855},{"style":637},[2856],{"type":398,"value":2857},"'revenue'",{"type":393,"tag":550,"props":2859,"children":2860},{"style":562},[2861],{"type":398,"value":2862},"] ",{"type":393,"tag":550,"props":2864,"children":2865},{"style":556},[2866],{"type":398,"value":626},{"type":393,"tag":550,"props":2868,"children":2869},{"style":562},[2870],{"type":398,"value":2871}," filled_zero[",{"type":393,"tag":550,"props":2873,"children":2874},{"style":637},[2875],{"type":398,"value":2857},{"type":393,"tag":550,"props":2877,"children":2878},{"style":562},[2879],{"type":398,"value":2880},"].fillna(",{"type":393,"tag":550,"props":2882,"children":2883},{"style":648},[2884],{"type":398,"value":479},{"type":393,"tag":550,"props":2886,"children":2887},{"style":562},[2888],{"type":398,"value":952},{"type":393,"tag":550,"props":2890,"children":2891},{"class":552,"line":215},[2892,2896],{"type":393,"tag":550,"props":2893,"children":2894},{"style":648},[2895],{"type":398,"value":937},{"type":393,"tag":550,"props":2897,"children":2898},{"style":562},[2899],{"type":398,"value":2900},"(filled_zero)\n",{"type":393,"tag":550,"props":2902,"children":2903},{"class":552,"line":224},[2904,2908],{"type":393,"tag":550,"props":2905,"children":2906},{"style":648},[2907],{"type":398,"value":937},{"type":393,"tag":550,"props":2909,"children":2910},{"style":562},[2911],{"type":398,"value":976},{"type":393,"tag":550,"props":2913,"children":2914},{"class":552,"line":233},[2915],{"type":393,"tag":550,"props":2916,"children":2917},{"emptyLinePlaceholder":12},[2918],{"type":398,"value":604},{"type":393,"tag":550,"props":2920,"children":2921},{"class":552,"line":244},[2922,2926,2930,2935],{"type":393,"tag":550,"props":2923,"children":2924},{"style":648},[2925],{"type":398,"value":937},{"type":393,"tag":550,"props":2927,"children":2928},{"style":562},[2929],{"type":398,"value":942},{"type":393,"tag":550,"props":2931,"children":2932},{"style":637},[2933],{"type":398,"value":2934},"\"2️⃣ Fill revenue with average:\"",{"type":393,"tag":550,"props":2936,"children":2937},{"style":562},[2938],{"type":398,"value":952},{"type":393,"tag":550,"props":2940,"children":2941},{"class":552,"line":253},[2942,2947,2951],{"type":393,"tag":550,"props":2943,"children":2944},{"style":562},[2945],{"type":398,"value":2946},"filled_mean ",{"type":393,"tag":550,"props":2948,"children":2949},{"style":556},[2950],{"type":398,"value":626},{"type":393,"tag":550,"props":2952,"children":2953},{"style":562},[2954],{"type":398,"value":2844},{"type":393,"tag":550,"props":2956,"children":2957},{"class":552,"line":262},[2958,2963,2967,2972,2976],{"type":393,"tag":550,"props":2959,"children":2960},{"style":562},[2961],{"type":398,"value":2962},"avg_revenue ",{"type":393,"tag":550,"props":2964,"children":2965},{"style":556},[2966],{"type":398,"value":626},{"type":393,"tag":550,"props":2968,"children":2969},{"style":562},[2970],{"type":398,"value":2971}," sales[",{"type":393,"tag":550,"props":2973,"children":2974},{"style":637},[2975],{"type":398,"value":2857},{"type":393,"tag":550,"props":2977,"children":2978},{"style":562},[2979],{"type":398,"value":2980},"].mean()\n",{"type":393,"tag":550,"props":2982,"children":2983},{"class":552,"line":271},[2984,2989,2993,2997,3001,3006,3010],{"type":393,"tag":550,"props":2985,"children":2986},{"style":562},[2987],{"type":398,"value":2988},"filled_mean[",{"type":393,"tag":550,"props":2990,"children":2991},{"style":637},[2992],{"type":398,"value":2857},{"type":393,"tag":550,"props":2994,"children":2995},{"style":562},[2996],{"type":398,"value":2862},{"type":393,"tag":550,"props":2998,"children":2999},{"style":556},[3000],{"type":398,"value":626},{"type":393,"tag":550,"props":3002,"children":3003},{"style":562},[3004],{"type":398,"value":3005}," filled_mean[",{"type":393,"tag":550,"props":3007,"children":3008},{"style":637},[3009],{"type":398,"value":2857},{"type":393,"tag":550,"props":3011,"children":3012},{"style":562},[3013],{"type":398,"value":3014},"].fillna(avg_revenue)\n",{"type":393,"tag":550,"props":3016,"children":3017},{"class":552,"line":281},[3018,3022],{"type":393,"tag":550,"props":3019,"children":3020},{"style":648},[3021],{"type":398,"value":937},{"type":393,"tag":550,"props":3023,"children":3024},{"style":562},[3025],{"type":398,"value":3026},"(filled_mean)\n",{"type":393,"tag":550,"props":3028,"children":3029},{"class":552,"line":290},[3030,3034,3038,3042,3047,3051,3056,3061,3065,3069],{"type":393,"tag":550,"props":3031,"children":3032},{"style":648},[3033],{"type":398,"value":937},{"type":393,"tag":550,"props":3035,"children":3036},{"style":562},[3037],{"type":398,"value":942},{"type":393,"tag":550,"props":3039,"children":3040},{"style":556},[3041],{"type":398,"value":1157},{"type":393,"tag":550,"props":3043,"children":3044},{"style":637},[3045],{"type":398,"value":3046},"\"Average revenue used: $",{"type":393,"tag":550,"props":3048,"children":3049},{"style":648},[3050],{"type":398,"value":1167},{"type":393,"tag":550,"props":3052,"children":3053},{"style":562},[3054],{"type":398,"value":3055},"avg_revenue",{"type":393,"tag":550,"props":3057,"children":3058},{"style":556},[3059],{"type":398,"value":3060},":,.0f",{"type":393,"tag":550,"props":3062,"children":3063},{"style":648},[3064],{"type":398,"value":1177},{"type":393,"tag":550,"props":3066,"children":3067},{"style":637},[3068],{"type":398,"value":1182},{"type":393,"tag":550,"props":3070,"children":3071},{"style":562},[3072],{"type":398,"value":952},{"type":393,"tag":550,"props":3074,"children":3075},{"class":552,"line":299},[3076,3080],{"type":393,"tag":550,"props":3077,"children":3078},{"style":648},[3079],{"type":398,"value":937},{"type":393,"tag":550,"props":3081,"children":3082},{"style":562},[3083],{"type":398,"value":976},{"type":393,"tag":550,"props":3085,"children":3086},{"class":552,"line":308},[3087],{"type":393,"tag":550,"props":3088,"children":3089},{"emptyLinePlaceholder":12},[3090],{"type":398,"value":604},{"type":393,"tag":550,"props":3092,"children":3093},{"class":552,"line":318},[3094,3098,3102,3107],{"type":393,"tag":550,"props":3095,"children":3096},{"style":648},[3097],{"type":398,"value":937},{"type":393,"tag":550,"props":3099,"children":3100},{"style":562},[3101],{"type":398,"value":942},{"type":393,"tag":550,"props":3103,"children":3104},{"style":637},[3105],{"type":398,"value":3106},"\"3️⃣ Fill region with 'Unknown':\"",{"type":393,"tag":550,"props":3108,"children":3109},{"style":562},[3110],{"type":398,"value":952},{"type":393,"tag":550,"props":3112,"children":3113},{"class":552,"line":327},[3114,3119,3123],{"type":393,"tag":550,"props":3115,"children":3116},{"style":562},[3117],{"type":398,"value":3118},"filled_text ",{"type":393,"tag":550,"props":3120,"children":3121},{"style":556},[3122],{"type":398,"value":626},{"type":393,"tag":550,"props":3124,"children":3125},{"style":562},[3126],{"type":398,"value":2844},{"type":393,"tag":550,"props":3128,"children":3129},{"class":552,"line":336},[3130,3135,3140,3144,3148,3153,3157,3161,3166],{"type":393,"tag":550,"props":3131,"children":3132},{"style":562},[3133],{"type":398,"value":3134},"filled_text[",{"type":393,"tag":550,"props":3136,"children":3137},{"style":637},[3138],{"type":398,"value":3139},"'region'",{"type":393,"tag":550,"props":3141,"children":3142},{"style":562},[3143],{"type":398,"value":2862},{"type":393,"tag":550,"props":3145,"children":3146},{"style":556},[3147],{"type":398,"value":626},{"type":393,"tag":550,"props":3149,"children":3150},{"style":562},[3151],{"type":398,"value":3152}," filled_text[",{"type":393,"tag":550,"props":3154,"children":3155},{"style":637},[3156],{"type":398,"value":3139},{"type":393,"tag":550,"props":3158,"children":3159},{"style":562},[3160],{"type":398,"value":2880},{"type":393,"tag":550,"props":3162,"children":3163},{"style":637},[3164],{"type":398,"value":3165},"'Unknown'",{"type":393,"tag":550,"props":3167,"children":3168},{"style":562},[3169],{"type":398,"value":952},{"type":393,"tag":550,"props":3171,"children":3172},{"class":552,"line":346},[3173,3177,3182,3187,3191,3195],{"type":393,"tag":550,"props":3174,"children":3175},{"style":648},[3176],{"type":398,"value":937},{"type":393,"tag":550,"props":3178,"children":3179},{"style":562},[3180],{"type":398,"value":3181},"(filled_text[[",{"type":393,"tag":550,"props":3183,"children":3184},{"style":637},[3185],{"type":398,"value":3186},"'month'",{"type":393,"tag":550,"props":3188,"children":3189},{"style":562},[3190],{"type":398,"value":656},{"type":393,"tag":550,"props":3192,"children":3193},{"style":637},[3194],{"type":398,"value":3139},{"type":393,"tag":550,"props":3196,"children":3197},{"style":562},[3198],{"type":398,"value":3199},"]])\n",{"type":393,"tag":524,"props":3201,"children":3203},{"id":3202},"smart-filling-strategies",[3204],{"type":398,"value":3205},"📈 Smart Filling Strategies",{"type":393,"tag":401,"props":3207,"children":3208},{},[3209],{"type":398,"value":3210},"Context-aware ways to fill missing data:",{"type":393,"tag":536,"props":3212,"children":3213},{},[3214],{"type":393,"tag":540,"props":3215,"children":3217},{"className":542,"code":3216,"language":544,"meta":6,"style":6},"import pandas as pd\nimport numpy as np\n\n# Student grades with strategic missing data\nstudents = pd.DataFrame({\n    'student': ['Alice', 'Bob', 'Charlie', 'Diana', 'Eve'],\n    'math_score': [85, None, 78, 92, None],\n    'science_score': [90, 88, None, 89, 85],\n    'attendance': [95, 88, 92, None, 90],\n    'grade_level': ['A', 'B', 'B', 'A', None]\n})\n\nprint(\"📊 Student Data:\")\nprint(students)\nprint()\n\nprint(\"📈 Smart Filling Strategies:\")\nprint()\n\nprint(\"1️⃣ Fill math scores with class average:\")\nsmart_fill = students.copy()\nclass_avg_math = students['math_score'].mean()\nsmart_fill['math_score'] = smart_fill['math_score'].fillna(class_avg_math)\nprint(\"Math scores filled with class average:\")\nprint(smart_fill[['student', 'math_score']])\nprint(f\"Class average: {class_avg_math:.1f}\")\nprint()\n\nprint(\"2️⃣ Fill attendance with median (typical attendance):\")\nmedian_attendance = students['attendance'].median()\nsmart_fill['attendance'] = smart_fill['attendance'].fillna(median_attendance)\nprint(\"Attendance filled with median:\")\nprint(smart_fill[['student', 'attendance']])\nprint(f\"Median attendance: {median_attendance}%\")\nprint()\n\nprint(\"3️⃣ Fill grade level based on average scores:\")\n# For Eve, calculate average and assign grade\neve_avg = (smart_fill.loc[4, 'science_score']) # Only science score available\nif eve_avg >= 90:\n    grade = 'A'\nelif eve_avg >= 80:\n    grade = 'B' \nelse:\n    grade = 'C'\nsmart_fill.loc[4, 'grade_level'] = grade\nprint(\"Grade level filled based on performance:\")\nprint(smart_fill[['student', 'science_score', 'grade_level']])\n",[3218],{"type":393,"tag":439,"props":3219,"children":3220},{"__ignoreMap":6},[3221,3240,3259,3266,3274,3290,3342,3397,3452,3504,3558,3565,3572,3592,3604,3615,3622,3642,3653,3660,3680,3697,3723,3757,3777,3806,3852,3863,3870,3890,3916,3948,3968,3995,4037,4048,4055,4075,4083,4123,4151,4169,4195,4217,4230,4247,4282,4303],{"type":393,"tag":550,"props":3222,"children":3223},{"class":552,"line":11},[3224,3228,3232,3236],{"type":393,"tag":550,"props":3225,"children":3226},{"style":556},[3227],{"type":398,"value":559},{"type":393,"tag":550,"props":3229,"children":3230},{"style":562},[3231],{"type":398,"value":565},{"type":393,"tag":550,"props":3233,"children":3234},{"style":556},[3235],{"type":398,"value":570},{"type":393,"tag":550,"props":3237,"children":3238},{"style":562},[3239],{"type":398,"value":575},{"type":393,"tag":550,"props":3241,"children":3242},{"class":552,"line":27},[3243,3247,3251,3255],{"type":393,"tag":550,"props":3244,"children":3245},{"style":556},[3246],{"type":398,"value":559},{"type":393,"tag":550,"props":3248,"children":3249},{"style":562},[3250],{"type":398,"value":587},{"type":393,"tag":550,"props":3252,"children":3253},{"style":556},[3254],{"type":398,"value":570},{"type":393,"tag":550,"props":3256,"children":3257},{"style":562},[3258],{"type":398,"value":596},{"type":393,"tag":550,"props":3260,"children":3261},{"class":552,"line":36},[3262],{"type":393,"tag":550,"props":3263,"children":3264},{"emptyLinePlaceholder":12},[3265],{"type":398,"value":604},{"type":393,"tag":550,"props":3267,"children":3268},{"class":552,"line":45},[3269],{"type":393,"tag":550,"props":3270,"children":3271},{"style":610},[3272],{"type":398,"value":3273},"# Student grades with strategic missing data\n",{"type":393,"tag":550,"props":3275,"children":3276},{"class":552,"line":54},[3277,3282,3286],{"type":393,"tag":550,"props":3278,"children":3279},{"style":562},[3280],{"type":398,"value":3281},"students ",{"type":393,"tag":550,"props":3283,"children":3284},{"style":556},[3285],{"type":398,"value":626},{"type":393,"tag":550,"props":3287,"children":3288},{"style":562},[3289],{"type":398,"value":631},{"type":393,"tag":550,"props":3291,"children":3292},{"class":552,"line":63},[3293,3298,3302,3306,3310,3314,3318,3322,3326,3330,3334,3338],{"type":393,"tag":550,"props":3294,"children":3295},{"style":637},[3296],{"type":398,"value":3297},"    'student'",{"type":393,"tag":550,"props":3299,"children":3300},{"style":562},[3301],{"type":398,"value":645},{"type":393,"tag":550,"props":3303,"children":3304},{"style":637},[3305],{"type":398,"value":710},{"type":393,"tag":550,"props":3307,"children":3308},{"style":562},[3309],{"type":398,"value":656},{"type":393,"tag":550,"props":3311,"children":3312},{"style":637},[3313],{"type":398,"value":719},{"type":393,"tag":550,"props":3315,"children":3316},{"style":562},[3317],{"type":398,"value":656},{"type":393,"tag":550,"props":3319,"children":3320},{"style":637},[3321],{"type":398,"value":2701},{"type":393,"tag":550,"props":3323,"children":3324},{"style":562},[3325],{"type":398,"value":656},{"type":393,"tag":550,"props":3327,"children":3328},{"style":637},[3329],{"type":398,"value":736},{"type":393,"tag":550,"props":3331,"children":3332},{"style":562},[3333],{"type":398,"value":656},{"type":393,"tag":550,"props":3335,"children":3336},{"style":637},[3337],{"type":398,"value":745},{"type":393,"tag":550,"props":3339,"children":3340},{"style":562},[3341],{"type":398,"value":693},{"type":393,"tag":550,"props":3343,"children":3344},{"class":552,"line":72},[3345,3350,3354,3359,3363,3367,3371,3376,3380,3385,3389,3393],{"type":393,"tag":550,"props":3346,"children":3347},{"style":637},[3348],{"type":398,"value":3349},"    'math_score'",{"type":393,"tag":550,"props":3351,"children":3352},{"style":562},[3353],{"type":398,"value":645},{"type":393,"tag":550,"props":3355,"children":3356},{"style":648},[3357],{"type":398,"value":3358},"85",{"type":393,"tag":550,"props":3360,"children":3361},{"style":562},[3362],{"type":398,"value":656},{"type":393,"tag":550,"props":3364,"children":3365},{"style":648},[3366],{"type":398,"value":455},{"type":393,"tag":550,"props":3368,"children":3369},{"style":562},[3370],{"type":398,"value":656},{"type":393,"tag":550,"props":3372,"children":3373},{"style":648},[3374],{"type":398,"value":3375},"78",{"type":393,"tag":550,"props":3377,"children":3378},{"style":562},[3379],{"type":398,"value":656},{"type":393,"tag":550,"props":3381,"children":3382},{"style":648},[3383],{"type":398,"value":3384},"92",{"type":393,"tag":550,"props":3386,"children":3387},{"style":562},[3388],{"type":398,"value":656},{"type":393,"tag":550,"props":3390,"children":3391},{"style":648},[3392],{"type":398,"value":455},{"type":393,"tag":550,"props":3394,"children":3395},{"style":562},[3396],{"type":398,"value":693},{"type":393,"tag":550,"props":3398,"children":3399},{"class":552,"line":83},[3400,3405,3409,3414,3418,3423,3427,3431,3435,3440,3444,3448],{"type":393,"tag":550,"props":3401,"children":3402},{"style":637},[3403],{"type":398,"value":3404},"    'science_score'",{"type":393,"tag":550,"props":3406,"children":3407},{"style":562},[3408],{"type":398,"value":645},{"type":393,"tag":550,"props":3410,"children":3411},{"style":648},[3412],{"type":398,"value":3413},"90",{"type":393,"tag":550,"props":3415,"children":3416},{"style":562},[3417],{"type":398,"value":656},{"type":393,"tag":550,"props":3419,"children":3420},{"style":648},[3421],{"type":398,"value":3422},"88",{"type":393,"tag":550,"props":3424,"children":3425},{"style":562},[3426],{"type":398,"value":656},{"type":393,"tag":550,"props":3428,"children":3429},{"style":648},[3430],{"type":398,"value":455},{"type":393,"tag":550,"props":3432,"children":3433},{"style":562},[3434],{"type":398,"value":656},{"type":393,"tag":550,"props":3436,"children":3437},{"style":648},[3438],{"type":398,"value":3439},"89",{"type":393,"tag":550,"props":3441,"children":3442},{"style":562},[3443],{"type":398,"value":656},{"type":393,"tag":550,"props":3445,"children":3446},{"style":648},[3447],{"type":398,"value":3358},{"type":393,"tag":550,"props":3449,"children":3450},{"style":562},[3451],{"type":398,"value":693},{"type":393,"tag":550,"props":3453,"children":3454},{"class":552,"line":92},[3455,3460,3464,3468,3472,3476,3480,3484,3488,3492,3496,3500],{"type":393,"tag":550,"props":3456,"children":3457},{"style":637},[3458],{"type":398,"value":3459},"    'attendance'",{"type":393,"tag":550,"props":3461,"children":3462},{"style":562},[3463],{"type":398,"value":645},{"type":393,"tag":550,"props":3465,"children":3466},{"style":648},[3467],{"type":398,"value":1885},{"type":393,"tag":550,"props":3469,"children":3470},{"style":562},[3471],{"type":398,"value":656},{"type":393,"tag":550,"props":3473,"children":3474},{"style":648},[3475],{"type":398,"value":3422},{"type":393,"tag":550,"props":3477,"children":3478},{"style":562},[3479],{"type":398,"value":656},{"type":393,"tag":550,"props":3481,"children":3482},{"style":648},[3483],{"type":398,"value":3384},{"type":393,"tag":550,"props":3485,"children":3486},{"style":562},[3487],{"type":398,"value":656},{"type":393,"tag":550,"props":3489,"children":3490},{"style":648},[3491],{"type":398,"value":455},{"type":393,"tag":550,"props":3493,"children":3494},{"style":562},[3495],{"type":398,"value":656},{"type":393,"tag":550,"props":3497,"children":3498},{"style":648},[3499],{"type":398,"value":3413},{"type":393,"tag":550,"props":3501,"children":3502},{"style":562},[3503],{"type":398,"value":693},{"type":393,"tag":550,"props":3505,"children":3506},{"class":552,"line":101},[3507,3512,3516,3521,3525,3530,3534,3538,3542,3546,3550,3554],{"type":393,"tag":550,"props":3508,"children":3509},{"style":637},[3510],{"type":398,"value":3511},"    'grade_level'",{"type":393,"tag":550,"props":3513,"children":3514},{"style":562},[3515],{"type":398,"value":645},{"type":393,"tag":550,"props":3517,"children":3518},{"style":637},[3519],{"type":398,"value":3520},"'A'",{"type":393,"tag":550,"props":3522,"children":3523},{"style":562},[3524],{"type":398,"value":656},{"type":393,"tag":550,"props":3526,"children":3527},{"style":637},[3528],{"type":398,"value":3529},"'B'",{"type":393,"tag":550,"props":3531,"children":3532},{"style":562},[3533],{"type":398,"value":656},{"type":393,"tag":550,"props":3535,"children":3536},{"style":637},[3537],{"type":398,"value":3529},{"type":393,"tag":550,"props":3539,"children":3540},{"style":562},[3541],{"type":398,"value":656},{"type":393,"tag":550,"props":3543,"children":3544},{"style":637},[3545],{"type":398,"value":3520},{"type":393,"tag":550,"props":3547,"children":3548},{"style":562},[3549],{"type":398,"value":656},{"type":393,"tag":550,"props":3551,"children":3552},{"style":648},[3553],{"type":398,"value":455},{"type":393,"tag":550,"props":3555,"children":3556},{"style":562},[3557],{"type":398,"value":914},{"type":393,"tag":550,"props":3559,"children":3560},{"class":552,"line":110},[3561],{"type":393,"tag":550,"props":3562,"children":3563},{"style":562},[3564],{"type":398,"value":922},{"type":393,"tag":550,"props":3566,"children":3567},{"class":552,"line":121},[3568],{"type":393,"tag":550,"props":3569,"children":3570},{"emptyLinePlaceholder":12},[3571],{"type":398,"value":604},{"type":393,"tag":550,"props":3573,"children":3574},{"class":552,"line":130},[3575,3579,3583,3588],{"type":393,"tag":550,"props":3576,"children":3577},{"style":648},[3578],{"type":398,"value":937},{"type":393,"tag":550,"props":3580,"children":3581},{"style":562},[3582],{"type":398,"value":942},{"type":393,"tag":550,"props":3584,"children":3585},{"style":637},[3586],{"type":398,"value":3587},"\"📊 Student Data:\"",{"type":393,"tag":550,"props":3589,"children":3590},{"style":562},[3591],{"type":398,"value":952},{"type":393,"tag":550,"props":3593,"children":3594},{"class":552,"line":139},[3595,3599],{"type":393,"tag":550,"props":3596,"children":3597},{"style":648},[3598],{"type":398,"value":937},{"type":393,"tag":550,"props":3600,"children":3601},{"style":562},[3602],{"type":398,"value":3603},"(students)\n",{"type":393,"tag":550,"props":3605,"children":3606},{"class":552,"line":148},[3607,3611],{"type":393,"tag":550,"props":3608,"children":3609},{"style":648},[3610],{"type":398,"value":937},{"type":393,"tag":550,"props":3612,"children":3613},{"style":562},[3614],{"type":398,"value":976},{"type":393,"tag":550,"props":3616,"children":3617},{"class":552,"line":159},[3618],{"type":393,"tag":550,"props":3619,"children":3620},{"emptyLinePlaceholder":12},[3621],{"type":398,"value":604},{"type":393,"tag":550,"props":3623,"children":3624},{"class":552,"line":168},[3625,3629,3633,3638],{"type":393,"tag":550,"props":3626,"children":3627},{"style":648},[3628],{"type":398,"value":937},{"type":393,"tag":550,"props":3630,"children":3631},{"style":562},[3632],{"type":398,"value":942},{"type":393,"tag":550,"props":3634,"children":3635},{"style":637},[3636],{"type":398,"value":3637},"\"📈 Smart Filling Strategies:\"",{"type":393,"tag":550,"props":3639,"children":3640},{"style":562},[3641],{"type":398,"value":952},{"type":393,"tag":550,"props":3643,"children":3644},{"class":552,"line":177},[3645,3649],{"type":393,"tag":550,"props":3646,"children":3647},{"style":648},[3648],{"type":398,"value":937},{"type":393,"tag":550,"props":3650,"children":3651},{"style":562},[3652],{"type":398,"value":976},{"type":393,"tag":550,"props":3654,"children":3655},{"class":552,"line":186},[3656],{"type":393,"tag":550,"props":3657,"children":3658},{"emptyLinePlaceholder":12},[3659],{"type":398,"value":604},{"type":393,"tag":550,"props":3661,"children":3662},{"class":552,"line":197},[3663,3667,3671,3676],{"type":393,"tag":550,"props":3664,"children":3665},{"style":648},[3666],{"type":398,"value":937},{"type":393,"tag":550,"props":3668,"children":3669},{"style":562},[3670],{"type":398,"value":942},{"type":393,"tag":550,"props":3672,"children":3673},{"style":637},[3674],{"type":398,"value":3675},"\"1️⃣ Fill math scores with class average:\"",{"type":393,"tag":550,"props":3677,"children":3678},{"style":562},[3679],{"type":398,"value":952},{"type":393,"tag":550,"props":3681,"children":3682},{"class":552,"line":206},[3683,3688,3692],{"type":393,"tag":550,"props":3684,"children":3685},{"style":562},[3686],{"type":398,"value":3687},"smart_fill ",{"type":393,"tag":550,"props":3689,"children":3690},{"style":556},[3691],{"type":398,"value":626},{"type":393,"tag":550,"props":3693,"children":3694},{"style":562},[3695],{"type":398,"value":3696}," students.copy()\n",{"type":393,"tag":550,"props":3698,"children":3699},{"class":552,"line":215},[3700,3705,3709,3714,3719],{"type":393,"tag":550,"props":3701,"children":3702},{"style":562},[3703],{"type":398,"value":3704},"class_avg_math ",{"type":393,"tag":550,"props":3706,"children":3707},{"style":556},[3708],{"type":398,"value":626},{"type":393,"tag":550,"props":3710,"children":3711},{"style":562},[3712],{"type":398,"value":3713}," students[",{"type":393,"tag":550,"props":3715,"children":3716},{"style":637},[3717],{"type":398,"value":3718},"'math_score'",{"type":393,"tag":550,"props":3720,"children":3721},{"style":562},[3722],{"type":398,"value":2980},{"type":393,"tag":550,"props":3724,"children":3725},{"class":552,"line":224},[3726,3731,3735,3739,3743,3748,3752],{"type":393,"tag":550,"props":3727,"children":3728},{"style":562},[3729],{"type":398,"value":3730},"smart_fill[",{"type":393,"tag":550,"props":3732,"children":3733},{"style":637},[3734],{"type":398,"value":3718},{"type":393,"tag":550,"props":3736,"children":3737},{"style":562},[3738],{"type":398,"value":2862},{"type":393,"tag":550,"props":3740,"children":3741},{"style":556},[3742],{"type":398,"value":626},{"type":393,"tag":550,"props":3744,"children":3745},{"style":562},[3746],{"type":398,"value":3747}," smart_fill[",{"type":393,"tag":550,"props":3749,"children":3750},{"style":637},[3751],{"type":398,"value":3718},{"type":393,"tag":550,"props":3753,"children":3754},{"style":562},[3755],{"type":398,"value":3756},"].fillna(class_avg_math)\n",{"type":393,"tag":550,"props":3758,"children":3759},{"class":552,"line":233},[3760,3764,3768,3773],{"type":393,"tag":550,"props":3761,"children":3762},{"style":648},[3763],{"type":398,"value":937},{"type":393,"tag":550,"props":3765,"children":3766},{"style":562},[3767],{"type":398,"value":942},{"type":393,"tag":550,"props":3769,"children":3770},{"style":637},[3771],{"type":398,"value":3772},"\"Math scores filled with class average:\"",{"type":393,"tag":550,"props":3774,"children":3775},{"style":562},[3776],{"type":398,"value":952},{"type":393,"tag":550,"props":3778,"children":3779},{"class":552,"line":244},[3780,3784,3789,3794,3798,3802],{"type":393,"tag":550,"props":3781,"children":3782},{"style":648},[3783],{"type":398,"value":937},{"type":393,"tag":550,"props":3785,"children":3786},{"style":562},[3787],{"type":398,"value":3788},"(smart_fill[[",{"type":393,"tag":550,"props":3790,"children":3791},{"style":637},[3792],{"type":398,"value":3793},"'student'",{"type":393,"tag":550,"props":3795,"children":3796},{"style":562},[3797],{"type":398,"value":656},{"type":393,"tag":550,"props":3799,"children":3800},{"style":637},[3801],{"type":398,"value":3718},{"type":393,"tag":550,"props":3803,"children":3804},{"style":562},[3805],{"type":398,"value":3199},{"type":393,"tag":550,"props":3807,"children":3808},{"class":552,"line":253},[3809,3813,3817,3821,3826,3830,3835,3840,3844,3848],{"type":393,"tag":550,"props":3810,"children":3811},{"style":648},[3812],{"type":398,"value":937},{"type":393,"tag":550,"props":3814,"children":3815},{"style":562},[3816],{"type":398,"value":942},{"type":393,"tag":550,"props":3818,"children":3819},{"style":556},[3820],{"type":398,"value":1157},{"type":393,"tag":550,"props":3822,"children":3823},{"style":637},[3824],{"type":398,"value":3825},"\"Class average: ",{"type":393,"tag":550,"props":3827,"children":3828},{"style":648},[3829],{"type":398,"value":1167},{"type":393,"tag":550,"props":3831,"children":3832},{"style":562},[3833],{"type":398,"value":3834},"class_avg_math",{"type":393,"tag":550,"props":3836,"children":3837},{"style":556},[3838],{"type":398,"value":3839},":.1f",{"type":393,"tag":550,"props":3841,"children":3842},{"style":648},[3843],{"type":398,"value":1177},{"type":393,"tag":550,"props":3845,"children":3846},{"style":637},[3847],{"type":398,"value":1182},{"type":393,"tag":550,"props":3849,"children":3850},{"style":562},[3851],{"type":398,"value":952},{"type":393,"tag":550,"props":3853,"children":3854},{"class":552,"line":262},[3855,3859],{"type":393,"tag":550,"props":3856,"children":3857},{"style":648},[3858],{"type":398,"value":937},{"type":393,"tag":550,"props":3860,"children":3861},{"style":562},[3862],{"type":398,"value":976},{"type":393,"tag":550,"props":3864,"children":3865},{"class":552,"line":271},[3866],{"type":393,"tag":550,"props":3867,"children":3868},{"emptyLinePlaceholder":12},[3869],{"type":398,"value":604},{"type":393,"tag":550,"props":3871,"children":3872},{"class":552,"line":281},[3873,3877,3881,3886],{"type":393,"tag":550,"props":3874,"children":3875},{"style":648},[3876],{"type":398,"value":937},{"type":393,"tag":550,"props":3878,"children":3879},{"style":562},[3880],{"type":398,"value":942},{"type":393,"tag":550,"props":3882,"children":3883},{"style":637},[3884],{"type":398,"value":3885},"\"2️⃣ Fill attendance with median (typical attendance):\"",{"type":393,"tag":550,"props":3887,"children":3888},{"style":562},[3889],{"type":398,"value":952},{"type":393,"tag":550,"props":3891,"children":3892},{"class":552,"line":290},[3893,3898,3902,3906,3911],{"type":393,"tag":550,"props":3894,"children":3895},{"style":562},[3896],{"type":398,"value":3897},"median_attendance ",{"type":393,"tag":550,"props":3899,"children":3900},{"style":556},[3901],{"type":398,"value":626},{"type":393,"tag":550,"props":3903,"children":3904},{"style":562},[3905],{"type":398,"value":3713},{"type":393,"tag":550,"props":3907,"children":3908},{"style":637},[3909],{"type":398,"value":3910},"'attendance'",{"type":393,"tag":550,"props":3912,"children":3913},{"style":562},[3914],{"type":398,"value":3915},"].median()\n",{"type":393,"tag":550,"props":3917,"children":3918},{"class":552,"line":299},[3919,3923,3927,3931,3935,3939,3943],{"type":393,"tag":550,"props":3920,"children":3921},{"style":562},[3922],{"type":398,"value":3730},{"type":393,"tag":550,"props":3924,"children":3925},{"style":637},[3926],{"type":398,"value":3910},{"type":393,"tag":550,"props":3928,"children":3929},{"style":562},[3930],{"type":398,"value":2862},{"type":393,"tag":550,"props":3932,"children":3933},{"style":556},[3934],{"type":398,"value":626},{"type":393,"tag":550,"props":3936,"children":3937},{"style":562},[3938],{"type":398,"value":3747},{"type":393,"tag":550,"props":3940,"children":3941},{"style":637},[3942],{"type":398,"value":3910},{"type":393,"tag":550,"props":3944,"children":3945},{"style":562},[3946],{"type":398,"value":3947},"].fillna(median_attendance)\n",{"type":393,"tag":550,"props":3949,"children":3950},{"class":552,"line":308},[3951,3955,3959,3964],{"type":393,"tag":550,"props":3952,"children":3953},{"style":648},[3954],{"type":398,"value":937},{"type":393,"tag":550,"props":3956,"children":3957},{"style":562},[3958],{"type":398,"value":942},{"type":393,"tag":550,"props":3960,"children":3961},{"style":637},[3962],{"type":398,"value":3963},"\"Attendance filled with median:\"",{"type":393,"tag":550,"props":3965,"children":3966},{"style":562},[3967],{"type":398,"value":952},{"type":393,"tag":550,"props":3969,"children":3970},{"class":552,"line":318},[3971,3975,3979,3983,3987,3991],{"type":393,"tag":550,"props":3972,"children":3973},{"style":648},[3974],{"type":398,"value":937},{"type":393,"tag":550,"props":3976,"children":3977},{"style":562},[3978],{"type":398,"value":3788},{"type":393,"tag":550,"props":3980,"children":3981},{"style":637},[3982],{"type":398,"value":3793},{"type":393,"tag":550,"props":3984,"children":3985},{"style":562},[3986],{"type":398,"value":656},{"type":393,"tag":550,"props":3988,"children":3989},{"style":637},[3990],{"type":398,"value":3910},{"type":393,"tag":550,"props":3992,"children":3993},{"style":562},[3994],{"type":398,"value":3199},{"type":393,"tag":550,"props":3996,"children":3997},{"class":552,"line":327},[3998,4002,4006,4010,4015,4019,4024,4028,4033],{"type":393,"tag":550,"props":3999,"children":4000},{"style":648},[4001],{"type":398,"value":937},{"type":393,"tag":550,"props":4003,"children":4004},{"style":562},[4005],{"type":398,"value":942},{"type":393,"tag":550,"props":4007,"children":4008},{"style":556},[4009],{"type":398,"value":1157},{"type":393,"tag":550,"props":4011,"children":4012},{"style":637},[4013],{"type":398,"value":4014},"\"Median attendance: ",{"type":393,"tag":550,"props":4016,"children":4017},{"style":648},[4018],{"type":398,"value":1167},{"type":393,"tag":550,"props":4020,"children":4021},{"style":562},[4022],{"type":398,"value":4023},"median_attendance",{"type":393,"tag":550,"props":4025,"children":4026},{"style":648},[4027],{"type":398,"value":1177},{"type":393,"tag":550,"props":4029,"children":4030},{"style":637},[4031],{"type":398,"value":4032},"%\"",{"type":393,"tag":550,"props":4034,"children":4035},{"style":562},[4036],{"type":398,"value":952},{"type":393,"tag":550,"props":4038,"children":4039},{"class":552,"line":336},[4040,4044],{"type":393,"tag":550,"props":4041,"children":4042},{"style":648},[4043],{"type":398,"value":937},{"type":393,"tag":550,"props":4045,"children":4046},{"style":562},[4047],{"type":398,"value":976},{"type":393,"tag":550,"props":4049,"children":4050},{"class":552,"line":346},[4051],{"type":393,"tag":550,"props":4052,"children":4053},{"emptyLinePlaceholder":12},[4054],{"type":398,"value":604},{"type":393,"tag":550,"props":4056,"children":4057},{"class":552,"line":355},[4058,4062,4066,4071],{"type":393,"tag":550,"props":4059,"children":4060},{"style":648},[4061],{"type":398,"value":937},{"type":393,"tag":550,"props":4063,"children":4064},{"style":562},[4065],{"type":398,"value":942},{"type":393,"tag":550,"props":4067,"children":4068},{"style":637},[4069],{"type":398,"value":4070},"\"3️⃣ Fill grade level based on average scores:\"",{"type":393,"tag":550,"props":4072,"children":4073},{"style":562},[4074],{"type":398,"value":952},{"type":393,"tag":550,"props":4076,"children":4077},{"class":552,"line":364},[4078],{"type":393,"tag":550,"props":4079,"children":4080},{"style":610},[4081],{"type":398,"value":4082},"# For Eve, calculate average and assign grade\n",{"type":393,"tag":550,"props":4084,"children":4085},{"class":552,"line":374},[4086,4091,4095,4100,4104,4108,4113,4118],{"type":393,"tag":550,"props":4087,"children":4088},{"style":562},[4089],{"type":398,"value":4090},"eve_avg ",{"type":393,"tag":550,"props":4092,"children":4093},{"style":556},[4094],{"type":398,"value":626},{"type":393,"tag":550,"props":4096,"children":4097},{"style":562},[4098],{"type":398,"value":4099}," (smart_fill.loc[",{"type":393,"tag":550,"props":4101,"children":4102},{"style":648},[4103],{"type":398,"value":679},{"type":393,"tag":550,"props":4105,"children":4106},{"style":562},[4107],{"type":398,"value":656},{"type":393,"tag":550,"props":4109,"children":4110},{"style":637},[4111],{"type":398,"value":4112},"'science_score'",{"type":393,"tag":550,"props":4114,"children":4115},{"style":562},[4116],{"type":398,"value":4117},"]) ",{"type":393,"tag":550,"props":4119,"children":4120},{"style":610},[4121],{"type":398,"value":4122},"# Only science score available\n",{"type":393,"tag":550,"props":4124,"children":4125},{"class":552,"line":383},[4126,4131,4136,4141,4146],{"type":393,"tag":550,"props":4127,"children":4128},{"style":556},[4129],{"type":398,"value":4130},"if",{"type":393,"tag":550,"props":4132,"children":4133},{"style":562},[4134],{"type":398,"value":4135}," eve_avg ",{"type":393,"tag":550,"props":4137,"children":4138},{"style":556},[4139],{"type":398,"value":4140},">=",{"type":393,"tag":550,"props":4142,"children":4143},{"style":648},[4144],{"type":398,"value":4145}," 90",{"type":393,"tag":550,"props":4147,"children":4148},{"style":562},[4149],{"type":398,"value":4150},":\n",{"type":393,"tag":550,"props":4152,"children":4154},{"class":552,"line":4153},41,[4155,4160,4164],{"type":393,"tag":550,"props":4156,"children":4157},{"style":562},[4158],{"type":398,"value":4159},"    grade ",{"type":393,"tag":550,"props":4161,"children":4162},{"style":556},[4163],{"type":398,"value":626},{"type":393,"tag":550,"props":4165,"children":4166},{"style":637},[4167],{"type":398,"value":4168}," 'A'\n",{"type":393,"tag":550,"props":4170,"children":4172},{"class":552,"line":4171},42,[4173,4178,4182,4186,4191],{"type":393,"tag":550,"props":4174,"children":4175},{"style":556},[4176],{"type":398,"value":4177},"elif",{"type":393,"tag":550,"props":4179,"children":4180},{"style":562},[4181],{"type":398,"value":4135},{"type":393,"tag":550,"props":4183,"children":4184},{"style":556},[4185],{"type":398,"value":4140},{"type":393,"tag":550,"props":4187,"children":4188},{"style":648},[4189],{"type":398,"value":4190}," 80",{"type":393,"tag":550,"props":4192,"children":4193},{"style":562},[4194],{"type":398,"value":4150},{"type":393,"tag":550,"props":4196,"children":4198},{"class":552,"line":4197},43,[4199,4203,4207,4212],{"type":393,"tag":550,"props":4200,"children":4201},{"style":562},[4202],{"type":398,"value":4159},{"type":393,"tag":550,"props":4204,"children":4205},{"style":556},[4206],{"type":398,"value":626},{"type":393,"tag":550,"props":4208,"children":4209},{"style":637},[4210],{"type":398,"value":4211}," 'B'",{"type":393,"tag":550,"props":4213,"children":4214},{"style":562},[4215],{"type":398,"value":4216}," \n",{"type":393,"tag":550,"props":4218,"children":4220},{"class":552,"line":4219},44,[4221,4226],{"type":393,"tag":550,"props":4222,"children":4223},{"style":556},[4224],{"type":398,"value":4225},"else",{"type":393,"tag":550,"props":4227,"children":4228},{"style":562},[4229],{"type":398,"value":4150},{"type":393,"tag":550,"props":4231,"children":4233},{"class":552,"line":4232},45,[4234,4238,4242],{"type":393,"tag":550,"props":4235,"children":4236},{"style":562},[4237],{"type":398,"value":4159},{"type":393,"tag":550,"props":4239,"children":4240},{"style":556},[4241],{"type":398,"value":626},{"type":393,"tag":550,"props":4243,"children":4244},{"style":637},[4245],{"type":398,"value":4246}," 'C'\n",{"type":393,"tag":550,"props":4248,"children":4250},{"class":552,"line":4249},46,[4251,4256,4260,4264,4269,4273,4277],{"type":393,"tag":550,"props":4252,"children":4253},{"style":562},[4254],{"type":398,"value":4255},"smart_fill.loc[",{"type":393,"tag":550,"props":4257,"children":4258},{"style":648},[4259],{"type":398,"value":679},{"type":393,"tag":550,"props":4261,"children":4262},{"style":562},[4263],{"type":398,"value":656},{"type":393,"tag":550,"props":4265,"children":4266},{"style":637},[4267],{"type":398,"value":4268},"'grade_level'",{"type":393,"tag":550,"props":4270,"children":4271},{"style":562},[4272],{"type":398,"value":2862},{"type":393,"tag":550,"props":4274,"children":4275},{"style":556},[4276],{"type":398,"value":626},{"type":393,"tag":550,"props":4278,"children":4279},{"style":562},[4280],{"type":398,"value":4281}," grade\n",{"type":393,"tag":550,"props":4283,"children":4285},{"class":552,"line":4284},47,[4286,4290,4294,4299],{"type":393,"tag":550,"props":4287,"children":4288},{"style":648},[4289],{"type":398,"value":937},{"type":393,"tag":550,"props":4291,"children":4292},{"style":562},[4293],{"type":398,"value":942},{"type":393,"tag":550,"props":4295,"children":4296},{"style":637},[4297],{"type":398,"value":4298},"\"Grade level filled based on performance:\"",{"type":393,"tag":550,"props":4300,"children":4301},{"style":562},[4302],{"type":398,"value":952},{"type":393,"tag":550,"props":4304,"children":4306},{"class":552,"line":4305},48,[4307,4311,4315,4319,4323,4327,4331,4335],{"type":393,"tag":550,"props":4308,"children":4309},{"style":648},[4310],{"type":398,"value":937},{"type":393,"tag":550,"props":4312,"children":4313},{"style":562},[4314],{"type":398,"value":3788},{"type":393,"tag":550,"props":4316,"children":4317},{"style":637},[4318],{"type":398,"value":3793},{"type":393,"tag":550,"props":4320,"children":4321},{"style":562},[4322],{"type":398,"value":656},{"type":393,"tag":550,"props":4324,"children":4325},{"style":637},[4326],{"type":398,"value":4112},{"type":393,"tag":550,"props":4328,"children":4329},{"style":562},[4330],{"type":398,"value":656},{"type":393,"tag":550,"props":4332,"children":4333},{"style":637},[4334],{"type":398,"value":4268},{"type":393,"tag":550,"props":4336,"children":4337},{"style":562},[4338],{"type":398,"value":3199},{"type":393,"tag":524,"props":4340,"children":4342},{"id":4341},"practical-missing-data-scenarios",[4343],{"type":398,"value":4344},"🎯 Practical Missing Data Scenarios",{"type":393,"tag":401,"props":4346,"children":4347},{},[4348],{"type":398,"value":4349},"Real-world examples of handling missing data:",{"type":393,"tag":536,"props":4351,"children":4352},{},[4353],{"type":393,"tag":540,"props":4354,"children":4356},{"className":542,"code":4355,"language":544,"meta":6,"style":6},"import pandas as pd\nimport numpy as np\n\n# E-commerce order data\norders = pd.DataFrame({\n    'order_id': [1001, 1002, 1003, 1004, 1005],\n    'customer_name': ['Alice', 'Bob', None, 'Diana', 'Eve'],\n    'product': ['Laptop', 'Mouse', 'Keyboard', 'Monitor', 'Tablet'],\n    'quantity': [1, 2, 1, None, 1],\n    'price': [999, 25, 75, 300, None],\n    'shipping_address': ['123 Main St', None, '789 Oak Ave', '456 Pine St', '321 Elm St']\n})\n\nprint(\"📦 E-commerce Orders:\")\nprint(orders)\nprint()\n\nprint(\"🎯 Business Logic for Missing Data:\")\nprint()\n\n# Strategy 1: Quantity defaults to 1\nprint(\"1️⃣ Missing quantity = 1 (standard order):\")\nbusiness_logic = orders.copy()\nbusiness_logic['quantity'] = business_logic['quantity'].fillna(1)\nprint(business_logic[['order_id', 'quantity']])\nprint()\n\n# Strategy 2: Price from product catalog (simplified)\nprint(\"2️⃣ Fill missing price from product catalog:\")\n# Simulate looking up tablet price\ntablet_price = 450  # From product catalog\nbusiness_logic.loc[business_logic['product'] == 'Tablet', 'price'] = business_logic.loc[business_logic['product'] == 'Tablet', 'price'].fillna(tablet_price)\nprint(f\"Tablet price filled: ${tablet_price}\")\nprint(business_logic[['product', 'price']])\nprint()\n\n# Strategy 3: Handle critical missing data\nprint(\"3️⃣ Orders missing customer name (needs attention):\")\nmissing_customer = business_logic[business_logic['customer_name'].isnull()]\nprint(\"Orders needing customer follow-up:\")\nprint(missing_customer[['order_id', 'product']])\n",[4357],{"type":393,"tag":439,"props":4358,"children":4359},{"__ignoreMap":6},[4360,4379,4398,4405,4413,4429,4486,4538,4589,4641,4693,4749,4756,4763,4783,4795,4806,4813,4833,4844,4851,4859,4879,4896,4938,4967,4978,4985,4993,5013,5021,5043,5121,5162,5189,5200,5207,5215,5235,5262,5282],{"type":393,"tag":550,"props":4361,"children":4362},{"class":552,"line":11},[4363,4367,4371,4375],{"type":393,"tag":550,"props":4364,"children":4365},{"style":556},[4366],{"type":398,"value":559},{"type":393,"tag":550,"props":4368,"children":4369},{"style":562},[4370],{"type":398,"value":565},{"type":393,"tag":550,"props":4372,"children":4373},{"style":556},[4374],{"type":398,"value":570},{"type":393,"tag":550,"props":4376,"children":4377},{"style":562},[4378],{"type":398,"value":575},{"type":393,"tag":550,"props":4380,"children":4381},{"class":552,"line":27},[4382,4386,4390,4394],{"type":393,"tag":550,"props":4383,"children":4384},{"style":556},[4385],{"type":398,"value":559},{"type":393,"tag":550,"props":4387,"children":4388},{"style":562},[4389],{"type":398,"value":587},{"type":393,"tag":550,"props":4391,"children":4392},{"style":556},[4393],{"type":398,"value":570},{"type":393,"tag":550,"props":4395,"children":4396},{"style":562},[4397],{"type":398,"value":596},{"type":393,"tag":550,"props":4399,"children":4400},{"class":552,"line":36},[4401],{"type":393,"tag":550,"props":4402,"children":4403},{"emptyLinePlaceholder":12},[4404],{"type":398,"value":604},{"type":393,"tag":550,"props":4406,"children":4407},{"class":552,"line":45},[4408],{"type":393,"tag":550,"props":4409,"children":4410},{"style":610},[4411],{"type":398,"value":4412},"# E-commerce order data\n",{"type":393,"tag":550,"props":4414,"children":4415},{"class":552,"line":54},[4416,4421,4425],{"type":393,"tag":550,"props":4417,"children":4418},{"style":562},[4419],{"type":398,"value":4420},"orders ",{"type":393,"tag":550,"props":4422,"children":4423},{"style":556},[4424],{"type":398,"value":626},{"type":393,"tag":550,"props":4426,"children":4427},{"style":562},[4428],{"type":398,"value":631},{"type":393,"tag":550,"props":4430,"children":4431},{"class":552,"line":63},[4432,4437,4441,4446,4450,4455,4459,4464,4468,4473,4477,4482],{"type":393,"tag":550,"props":4433,"children":4434},{"style":637},[4435],{"type":398,"value":4436},"    'order_id'",{"type":393,"tag":550,"props":4438,"children":4439},{"style":562},[4440],{"type":398,"value":645},{"type":393,"tag":550,"props":4442,"children":4443},{"style":648},[4444],{"type":398,"value":4445},"1001",{"type":393,"tag":550,"props":4447,"children":4448},{"style":562},[4449],{"type":398,"value":656},{"type":393,"tag":550,"props":4451,"children":4452},{"style":648},[4453],{"type":398,"value":4454},"1002",{"type":393,"tag":550,"props":4456,"children":4457},{"style":562},[4458],{"type":398,"value":656},{"type":393,"tag":550,"props":4460,"children":4461},{"style":648},[4462],{"type":398,"value":4463},"1003",{"type":393,"tag":550,"props":4465,"children":4466},{"style":562},[4467],{"type":398,"value":656},{"type":393,"tag":550,"props":4469,"children":4470},{"style":648},[4471],{"type":398,"value":4472},"1004",{"type":393,"tag":550,"props":4474,"children":4475},{"style":562},[4476],{"type":398,"value":656},{"type":393,"tag":550,"props":4478,"children":4479},{"style":648},[4480],{"type":398,"value":4481},"1005",{"type":393,"tag":550,"props":4483,"children":4484},{"style":562},[4485],{"type":398,"value":693},{"type":393,"tag":550,"props":4487,"children":4488},{"class":552,"line":72},[4489,4494,4498,4502,4506,4510,4514,4518,4522,4526,4530,4534],{"type":393,"tag":550,"props":4490,"children":4491},{"style":637},[4492],{"type":398,"value":4493},"    'customer_name'",{"type":393,"tag":550,"props":4495,"children":4496},{"style":562},[4497],{"type":398,"value":645},{"type":393,"tag":550,"props":4499,"children":4500},{"style":637},[4501],{"type":398,"value":710},{"type":393,"tag":550,"props":4503,"children":4504},{"style":562},[4505],{"type":398,"value":656},{"type":393,"tag":550,"props":4507,"children":4508},{"style":637},[4509],{"type":398,"value":719},{"type":393,"tag":550,"props":4511,"children":4512},{"style":562},[4513],{"type":398,"value":656},{"type":393,"tag":550,"props":4515,"children":4516},{"style":648},[4517],{"type":398,"value":455},{"type":393,"tag":550,"props":4519,"children":4520},{"style":562},[4521],{"type":398,"value":656},{"type":393,"tag":550,"props":4523,"children":4524},{"style":637},[4525],{"type":398,"value":736},{"type":393,"tag":550,"props":4527,"children":4528},{"style":562},[4529],{"type":398,"value":656},{"type":393,"tag":550,"props":4531,"children":4532},{"style":637},[4533],{"type":398,"value":745},{"type":393,"tag":550,"props":4535,"children":4536},{"style":562},[4537],{"type":398,"value":693},{"type":393,"tag":550,"props":4539,"children":4540},{"class":552,"line":83},[4541,4545,4549,4553,4557,4561,4565,4569,4573,4577,4581,4585],{"type":393,"tag":550,"props":4542,"children":4543},{"style":637},[4544],{"type":398,"value":1682},{"type":393,"tag":550,"props":4546,"children":4547},{"style":562},[4548],{"type":398,"value":645},{"type":393,"tag":550,"props":4550,"children":4551},{"style":637},[4552],{"type":398,"value":1691},{"type":393,"tag":550,"props":4554,"children":4555},{"style":562},[4556],{"type":398,"value":656},{"type":393,"tag":550,"props":4558,"children":4559},{"style":637},[4560],{"type":398,"value":1700},{"type":393,"tag":550,"props":4562,"children":4563},{"style":562},[4564],{"type":398,"value":656},{"type":393,"tag":550,"props":4566,"children":4567},{"style":637},[4568],{"type":398,"value":1709},{"type":393,"tag":550,"props":4570,"children":4571},{"style":562},[4572],{"type":398,"value":656},{"type":393,"tag":550,"props":4574,"children":4575},{"style":637},[4576],{"type":398,"value":1718},{"type":393,"tag":550,"props":4578,"children":4579},{"style":562},[4580],{"type":398,"value":656},{"type":393,"tag":550,"props":4582,"children":4583},{"style":637},[4584],{"type":398,"value":1727},{"type":393,"tag":550,"props":4586,"children":4587},{"style":562},[4588],{"type":398,"value":693},{"type":393,"tag":550,"props":4590,"children":4591},{"class":552,"line":92},[4592,4597,4601,4605,4609,4613,4617,4621,4625,4629,4633,4637],{"type":393,"tag":550,"props":4593,"children":4594},{"style":637},[4595],{"type":398,"value":4596},"    'quantity'",{"type":393,"tag":550,"props":4598,"children":4599},{"style":562},[4600],{"type":398,"value":645},{"type":393,"tag":550,"props":4602,"children":4603},{"style":648},[4604],{"type":398,"value":651},{"type":393,"tag":550,"props":4606,"children":4607},{"style":562},[4608],{"type":398,"value":656},{"type":393,"tag":550,"props":4610,"children":4611},{"style":648},[4612],{"type":398,"value":661},{"type":393,"tag":550,"props":4614,"children":4615},{"style":562},[4616],{"type":398,"value":656},{"type":393,"tag":550,"props":4618,"children":4619},{"style":648},[4620],{"type":398,"value":651},{"type":393,"tag":550,"props":4622,"children":4623},{"style":562},[4624],{"type":398,"value":656},{"type":393,"tag":550,"props":4626,"children":4627},{"style":648},[4628],{"type":398,"value":455},{"type":393,"tag":550,"props":4630,"children":4631},{"style":562},[4632],{"type":398,"value":656},{"type":393,"tag":550,"props":4634,"children":4635},{"style":648},[4636],{"type":398,"value":651},{"type":393,"tag":550,"props":4638,"children":4639},{"style":562},[4640],{"type":398,"value":693},{"type":393,"tag":550,"props":4642,"children":4643},{"class":552,"line":101},[4644,4648,4652,4656,4660,4664,4668,4672,4676,4681,4685,4689],{"type":393,"tag":550,"props":4645,"children":4646},{"style":637},[4647],{"type":398,"value":1794},{"type":393,"tag":550,"props":4649,"children":4650},{"style":562},[4651],{"type":398,"value":645},{"type":393,"tag":550,"props":4653,"children":4654},{"style":648},[4655],{"type":398,"value":1803},{"type":393,"tag":550,"props":4657,"children":4658},{"style":562},[4659],{"type":398,"value":656},{"type":393,"tag":550,"props":4661,"children":4662},{"style":648},[4663],{"type":398,"value":766},{"type":393,"tag":550,"props":4665,"children":4666},{"style":562},[4667],{"type":398,"value":656},{"type":393,"tag":550,"props":4669,"children":4670},{"style":648},[4671],{"type":398,"value":1820},{"type":393,"tag":550,"props":4673,"children":4674},{"style":562},[4675],{"type":398,"value":656},{"type":393,"tag":550,"props":4677,"children":4678},{"style":648},[4679],{"type":398,"value":4680},"300",{"type":393,"tag":550,"props":4682,"children":4683},{"style":562},[4684],{"type":398,"value":656},{"type":393,"tag":550,"props":4686,"children":4687},{"style":648},[4688],{"type":398,"value":455},{"type":393,"tag":550,"props":4690,"children":4691},{"style":562},[4692],{"type":398,"value":693},{"type":393,"tag":550,"props":4694,"children":4695},{"class":552,"line":110},[4696,4701,4705,4710,4714,4718,4722,4727,4731,4736,4740,4745],{"type":393,"tag":550,"props":4697,"children":4698},{"style":637},[4699],{"type":398,"value":4700},"    'shipping_address'",{"type":393,"tag":550,"props":4702,"children":4703},{"style":562},[4704],{"type":398,"value":645},{"type":393,"tag":550,"props":4706,"children":4707},{"style":637},[4708],{"type":398,"value":4709},"'123 Main St'",{"type":393,"tag":550,"props":4711,"children":4712},{"style":562},[4713],{"type":398,"value":656},{"type":393,"tag":550,"props":4715,"children":4716},{"style":648},[4717],{"type":398,"value":455},{"type":393,"tag":550,"props":4719,"children":4720},{"style":562},[4721],{"type":398,"value":656},{"type":393,"tag":550,"props":4723,"children":4724},{"style":637},[4725],{"type":398,"value":4726},"'789 Oak Ave'",{"type":393,"tag":550,"props":4728,"children":4729},{"style":562},[4730],{"type":398,"value":656},{"type":393,"tag":550,"props":4732,"children":4733},{"style":637},[4734],{"type":398,"value":4735},"'456 Pine St'",{"type":393,"tag":550,"props":4737,"children":4738},{"style":562},[4739],{"type":398,"value":656},{"type":393,"tag":550,"props":4741,"children":4742},{"style":637},[4743],{"type":398,"value":4744},"'321 Elm St'",{"type":393,"tag":550,"props":4746,"children":4747},{"style":562},[4748],{"type":398,"value":914},{"type":393,"tag":550,"props":4750,"children":4751},{"class":552,"line":121},[4752],{"type":393,"tag":550,"props":4753,"children":4754},{"style":562},[4755],{"type":398,"value":922},{"type":393,"tag":550,"props":4757,"children":4758},{"class":552,"line":130},[4759],{"type":393,"tag":550,"props":4760,"children":4761},{"emptyLinePlaceholder":12},[4762],{"type":398,"value":604},{"type":393,"tag":550,"props":4764,"children":4765},{"class":552,"line":139},[4766,4770,4774,4779],{"type":393,"tag":550,"props":4767,"children":4768},{"style":648},[4769],{"type":398,"value":937},{"type":393,"tag":550,"props":4771,"children":4772},{"style":562},[4773],{"type":398,"value":942},{"type":393,"tag":550,"props":4775,"children":4776},{"style":637},[4777],{"type":398,"value":4778},"\"📦 E-commerce Orders:\"",{"type":393,"tag":550,"props":4780,"children":4781},{"style":562},[4782],{"type":398,"value":952},{"type":393,"tag":550,"props":4784,"children":4785},{"class":552,"line":148},[4786,4790],{"type":393,"tag":550,"props":4787,"children":4788},{"style":648},[4789],{"type":398,"value":937},{"type":393,"tag":550,"props":4791,"children":4792},{"style":562},[4793],{"type":398,"value":4794},"(orders)\n",{"type":393,"tag":550,"props":4796,"children":4797},{"class":552,"line":159},[4798,4802],{"type":393,"tag":550,"props":4799,"children":4800},{"style":648},[4801],{"type":398,"value":937},{"type":393,"tag":550,"props":4803,"children":4804},{"style":562},[4805],{"type":398,"value":976},{"type":393,"tag":550,"props":4807,"children":4808},{"class":552,"line":168},[4809],{"type":393,"tag":550,"props":4810,"children":4811},{"emptyLinePlaceholder":12},[4812],{"type":398,"value":604},{"type":393,"tag":550,"props":4814,"children":4815},{"class":552,"line":177},[4816,4820,4824,4829],{"type":393,"tag":550,"props":4817,"children":4818},{"style":648},[4819],{"type":398,"value":937},{"type":393,"tag":550,"props":4821,"children":4822},{"style":562},[4823],{"type":398,"value":942},{"type":393,"tag":550,"props":4825,"children":4826},{"style":637},[4827],{"type":398,"value":4828},"\"🎯 Business Logic for Missing Data:\"",{"type":393,"tag":550,"props":4830,"children":4831},{"style":562},[4832],{"type":398,"value":952},{"type":393,"tag":550,"props":4834,"children":4835},{"class":552,"line":186},[4836,4840],{"type":393,"tag":550,"props":4837,"children":4838},{"style":648},[4839],{"type":398,"value":937},{"type":393,"tag":550,"props":4841,"children":4842},{"style":562},[4843],{"type":398,"value":976},{"type":393,"tag":550,"props":4845,"children":4846},{"class":552,"line":197},[4847],{"type":393,"tag":550,"props":4848,"children":4849},{"emptyLinePlaceholder":12},[4850],{"type":398,"value":604},{"type":393,"tag":550,"props":4852,"children":4853},{"class":552,"line":206},[4854],{"type":393,"tag":550,"props":4855,"children":4856},{"style":610},[4857],{"type":398,"value":4858},"# Strategy 1: Quantity defaults to 1\n",{"type":393,"tag":550,"props":4860,"children":4861},{"class":552,"line":215},[4862,4866,4870,4875],{"type":393,"tag":550,"props":4863,"children":4864},{"style":648},[4865],{"type":398,"value":937},{"type":393,"tag":550,"props":4867,"children":4868},{"style":562},[4869],{"type":398,"value":942},{"type":393,"tag":550,"props":4871,"children":4872},{"style":637},[4873],{"type":398,"value":4874},"\"1️⃣ Missing quantity = 1 (standard order):\"",{"type":393,"tag":550,"props":4876,"children":4877},{"style":562},[4878],{"type":398,"value":952},{"type":393,"tag":550,"props":4880,"children":4881},{"class":552,"line":224},[4882,4887,4891],{"type":393,"tag":550,"props":4883,"children":4884},{"style":562},[4885],{"type":398,"value":4886},"business_logic ",{"type":393,"tag":550,"props":4888,"children":4889},{"style":556},[4890],{"type":398,"value":626},{"type":393,"tag":550,"props":4892,"children":4893},{"style":562},[4894],{"type":398,"value":4895}," orders.copy()\n",{"type":393,"tag":550,"props":4897,"children":4898},{"class":552,"line":233},[4899,4904,4909,4913,4917,4922,4926,4930,4934],{"type":393,"tag":550,"props":4900,"children":4901},{"style":562},[4902],{"type":398,"value":4903},"business_logic[",{"type":393,"tag":550,"props":4905,"children":4906},{"style":637},[4907],{"type":398,"value":4908},"'quantity'",{"type":393,"tag":550,"props":4910,"children":4911},{"style":562},[4912],{"type":398,"value":2862},{"type":393,"tag":550,"props":4914,"children":4915},{"style":556},[4916],{"type":398,"value":626},{"type":393,"tag":550,"props":4918,"children":4919},{"style":562},[4920],{"type":398,"value":4921}," business_logic[",{"type":393,"tag":550,"props":4923,"children":4924},{"style":637},[4925],{"type":398,"value":4908},{"type":393,"tag":550,"props":4927,"children":4928},{"style":562},[4929],{"type":398,"value":2880},{"type":393,"tag":550,"props":4931,"children":4932},{"style":648},[4933],{"type":398,"value":651},{"type":393,"tag":550,"props":4935,"children":4936},{"style":562},[4937],{"type":398,"value":952},{"type":393,"tag":550,"props":4939,"children":4940},{"class":552,"line":244},[4941,4945,4950,4955,4959,4963],{"type":393,"tag":550,"props":4942,"children":4943},{"style":648},[4944],{"type":398,"value":937},{"type":393,"tag":550,"props":4946,"children":4947},{"style":562},[4948],{"type":398,"value":4949},"(business_logic[[",{"type":393,"tag":550,"props":4951,"children":4952},{"style":637},[4953],{"type":398,"value":4954},"'order_id'",{"type":393,"tag":550,"props":4956,"children":4957},{"style":562},[4958],{"type":398,"value":656},{"type":393,"tag":550,"props":4960,"children":4961},{"style":637},[4962],{"type":398,"value":4908},{"type":393,"tag":550,"props":4964,"children":4965},{"style":562},[4966],{"type":398,"value":3199},{"type":393,"tag":550,"props":4968,"children":4969},{"class":552,"line":253},[4970,4974],{"type":393,"tag":550,"props":4971,"children":4972},{"style":648},[4973],{"type":398,"value":937},{"type":393,"tag":550,"props":4975,"children":4976},{"style":562},[4977],{"type":398,"value":976},{"type":393,"tag":550,"props":4979,"children":4980},{"class":552,"line":262},[4981],{"type":393,"tag":550,"props":4982,"children":4983},{"emptyLinePlaceholder":12},[4984],{"type":398,"value":604},{"type":393,"tag":550,"props":4986,"children":4987},{"class":552,"line":271},[4988],{"type":393,"tag":550,"props":4989,"children":4990},{"style":610},[4991],{"type":398,"value":4992},"# Strategy 2: Price from product catalog (simplified)\n",{"type":393,"tag":550,"props":4994,"children":4995},{"class":552,"line":281},[4996,5000,5004,5009],{"type":393,"tag":550,"props":4997,"children":4998},{"style":648},[4999],{"type":398,"value":937},{"type":393,"tag":550,"props":5001,"children":5002},{"style":562},[5003],{"type":398,"value":942},{"type":393,"tag":550,"props":5005,"children":5006},{"style":637},[5007],{"type":398,"value":5008},"\"2️⃣ Fill missing price from product catalog:\"",{"type":393,"tag":550,"props":5010,"children":5011},{"style":562},[5012],{"type":398,"value":952},{"type":393,"tag":550,"props":5014,"children":5015},{"class":552,"line":290},[5016],{"type":393,"tag":550,"props":5017,"children":5018},{"style":610},[5019],{"type":398,"value":5020},"# Simulate looking up tablet price\n",{"type":393,"tag":550,"props":5022,"children":5023},{"class":552,"line":299},[5024,5029,5033,5038],{"type":393,"tag":550,"props":5025,"children":5026},{"style":562},[5027],{"type":398,"value":5028},"tablet_price ",{"type":393,"tag":550,"props":5030,"children":5031},{"style":556},[5032],{"type":398,"value":626},{"type":393,"tag":550,"props":5034,"children":5035},{"style":648},[5036],{"type":398,"value":5037}," 450",{"type":393,"tag":550,"props":5039,"children":5040},{"style":610},[5041],{"type":398,"value":5042},"  # From product catalog\n",{"type":393,"tag":550,"props":5044,"children":5045},{"class":552,"line":308},[5046,5051,5056,5060,5065,5070,5074,5079,5083,5087,5092,5096,5100,5104,5108,5112,5116],{"type":393,"tag":550,"props":5047,"children":5048},{"style":562},[5049],{"type":398,"value":5050},"business_logic.loc[business_logic[",{"type":393,"tag":550,"props":5052,"children":5053},{"style":637},[5054],{"type":398,"value":5055},"'product'",{"type":393,"tag":550,"props":5057,"children":5058},{"style":562},[5059],{"type":398,"value":2862},{"type":393,"tag":550,"props":5061,"children":5062},{"style":556},[5063],{"type":398,"value":5064},"==",{"type":393,"tag":550,"props":5066,"children":5067},{"style":637},[5068],{"type":398,"value":5069}," 'Tablet'",{"type":393,"tag":550,"props":5071,"children":5072},{"style":562},[5073],{"type":398,"value":656},{"type":393,"tag":550,"props":5075,"children":5076},{"style":637},[5077],{"type":398,"value":5078},"'price'",{"type":393,"tag":550,"props":5080,"children":5081},{"style":562},[5082],{"type":398,"value":2862},{"type":393,"tag":550,"props":5084,"children":5085},{"style":556},[5086],{"type":398,"value":626},{"type":393,"tag":550,"props":5088,"children":5089},{"style":562},[5090],{"type":398,"value":5091}," business_logic.loc[business_logic[",{"type":393,"tag":550,"props":5093,"children":5094},{"style":637},[5095],{"type":398,"value":5055},{"type":393,"tag":550,"props":5097,"children":5098},{"style":562},[5099],{"type":398,"value":2862},{"type":393,"tag":550,"props":5101,"children":5102},{"style":556},[5103],{"type":398,"value":5064},{"type":393,"tag":550,"props":5105,"children":5106},{"style":637},[5107],{"type":398,"value":5069},{"type":393,"tag":550,"props":5109,"children":5110},{"style":562},[5111],{"type":398,"value":656},{"type":393,"tag":550,"props":5113,"children":5114},{"style":637},[5115],{"type":398,"value":5078},{"type":393,"tag":550,"props":5117,"children":5118},{"style":562},[5119],{"type":398,"value":5120},"].fillna(tablet_price)\n",{"type":393,"tag":550,"props":5122,"children":5123},{"class":552,"line":318},[5124,5128,5132,5136,5141,5145,5150,5154,5158],{"type":393,"tag":550,"props":5125,"children":5126},{"style":648},[5127],{"type":398,"value":937},{"type":393,"tag":550,"props":5129,"children":5130},{"style":562},[5131],{"type":398,"value":942},{"type":393,"tag":550,"props":5133,"children":5134},{"style":556},[5135],{"type":398,"value":1157},{"type":393,"tag":550,"props":5137,"children":5138},{"style":637},[5139],{"type":398,"value":5140},"\"Tablet price filled: $",{"type":393,"tag":550,"props":5142,"children":5143},{"style":648},[5144],{"type":398,"value":1167},{"type":393,"tag":550,"props":5146,"children":5147},{"style":562},[5148],{"type":398,"value":5149},"tablet_price",{"type":393,"tag":550,"props":5151,"children":5152},{"style":648},[5153],{"type":398,"value":1177},{"type":393,"tag":550,"props":5155,"children":5156},{"style":637},[5157],{"type":398,"value":1182},{"type":393,"tag":550,"props":5159,"children":5160},{"style":562},[5161],{"type":398,"value":952},{"type":393,"tag":550,"props":5163,"children":5164},{"class":552,"line":327},[5165,5169,5173,5177,5181,5185],{"type":393,"tag":550,"props":5166,"children":5167},{"style":648},[5168],{"type":398,"value":937},{"type":393,"tag":550,"props":5170,"children":5171},{"style":562},[5172],{"type":398,"value":4949},{"type":393,"tag":550,"props":5174,"children":5175},{"style":637},[5176],{"type":398,"value":5055},{"type":393,"tag":550,"props":5178,"children":5179},{"style":562},[5180],{"type":398,"value":656},{"type":393,"tag":550,"props":5182,"children":5183},{"style":637},[5184],{"type":398,"value":5078},{"type":393,"tag":550,"props":5186,"children":5187},{"style":562},[5188],{"type":398,"value":3199},{"type":393,"tag":550,"props":5190,"children":5191},{"class":552,"line":336},[5192,5196],{"type":393,"tag":550,"props":5193,"children":5194},{"style":648},[5195],{"type":398,"value":937},{"type":393,"tag":550,"props":5197,"children":5198},{"style":562},[5199],{"type":398,"value":976},{"type":393,"tag":550,"props":5201,"children":5202},{"class":552,"line":346},[5203],{"type":393,"tag":550,"props":5204,"children":5205},{"emptyLinePlaceholder":12},[5206],{"type":398,"value":604},{"type":393,"tag":550,"props":5208,"children":5209},{"class":552,"line":355},[5210],{"type":393,"tag":550,"props":5211,"children":5212},{"style":610},[5213],{"type":398,"value":5214},"# Strategy 3: Handle critical missing data\n",{"type":393,"tag":550,"props":5216,"children":5217},{"class":552,"line":364},[5218,5222,5226,5231],{"type":393,"tag":550,"props":5219,"children":5220},{"style":648},[5221],{"type":398,"value":937},{"type":393,"tag":550,"props":5223,"children":5224},{"style":562},[5225],{"type":398,"value":942},{"type":393,"tag":550,"props":5227,"children":5228},{"style":637},[5229],{"type":398,"value":5230},"\"3️⃣ Orders missing customer name (needs attention):\"",{"type":393,"tag":550,"props":5232,"children":5233},{"style":562},[5234],{"type":398,"value":952},{"type":393,"tag":550,"props":5236,"children":5237},{"class":552,"line":374},[5238,5243,5247,5252,5257],{"type":393,"tag":550,"props":5239,"children":5240},{"style":562},[5241],{"type":398,"value":5242},"missing_customer ",{"type":393,"tag":550,"props":5244,"children":5245},{"style":556},[5246],{"type":398,"value":626},{"type":393,"tag":550,"props":5248,"children":5249},{"style":562},[5250],{"type":398,"value":5251}," business_logic[business_logic[",{"type":393,"tag":550,"props":5253,"children":5254},{"style":637},[5255],{"type":398,"value":5256},"'customer_name'",{"type":393,"tag":550,"props":5258,"children":5259},{"style":562},[5260],{"type":398,"value":5261},"].isnull()]\n",{"type":393,"tag":550,"props":5263,"children":5264},{"class":552,"line":383},[5265,5269,5273,5278],{"type":393,"tag":550,"props":5266,"children":5267},{"style":648},[5268],{"type":398,"value":937},{"type":393,"tag":550,"props":5270,"children":5271},{"style":562},[5272],{"type":398,"value":942},{"type":393,"tag":550,"props":5274,"children":5275},{"style":637},[5276],{"type":398,"value":5277},"\"Orders needing customer follow-up:\"",{"type":393,"tag":550,"props":5279,"children":5280},{"style":562},[5281],{"type":398,"value":952},{"type":393,"tag":550,"props":5283,"children":5284},{"class":552,"line":4153},[5285,5289,5294,5298,5302,5306],{"type":393,"tag":550,"props":5286,"children":5287},{"style":648},[5288],{"type":398,"value":937},{"type":393,"tag":550,"props":5290,"children":5291},{"style":562},[5292],{"type":398,"value":5293},"(missing_customer[[",{"type":393,"tag":550,"props":5295,"children":5296},{"style":637},[5297],{"type":398,"value":4954},{"type":393,"tag":550,"props":5299,"children":5300},{"style":562},[5301],{"type":398,"value":656},{"type":393,"tag":550,"props":5303,"children":5304},{"style":637},[5305],{"type":398,"value":5055},{"type":393,"tag":550,"props":5307,"children":5308},{"style":562},[5309],{"type":398,"value":3199},{"type":393,"tag":524,"props":5311,"children":5313},{"id":5312},"️-missing-data-pitfalls",[5314],{"type":398,"value":5315},"⚠️ Missing Data Pitfalls",{"type":393,"tag":401,"props":5317,"children":5318},{},[5319],{"type":398,"value":5320},"Avoid these common mistakes that can compromise your analysis:",{"type":393,"tag":407,"props":5322,"children":5325},{"emoji":5323,"title":5324,"type":1461},"⚠️","Missing Data Mistakes to Avoid",[5326,5334,5342,5365,5373,5409,5417,5440,5448,5461],{"type":393,"tag":401,"props":5327,"children":5328},{},[5329],{"type":393,"tag":417,"props":5330,"children":5331},{},[5332],{"type":398,"value":5333},"Critical Mistakes:",{"type":393,"tag":401,"props":5335,"children":5336},{},[5337],{"type":393,"tag":417,"props":5338,"children":5339},{},[5340],{"type":398,"value":5341},"1. Inappropriate Fill Values",{"type":393,"tag":431,"props":5343,"children":5344},{},[5345,5350,5355,5360],{"type":393,"tag":435,"props":5346,"children":5347},{},[5348],{"type":398,"value":5349},"❌ Wrong: Filling income with 0 (misleading for analysis)",{"type":393,"tag":435,"props":5351,"children":5352},{},[5353],{"type":398,"value":5354},"❌ Wrong: Filling age with 999 (creates unrealistic outliers)",{"type":393,"tag":435,"props":5356,"children":5357},{},[5358],{"type":398,"value":5359},"✅ Better: Use mean/median for numeric data",{"type":393,"tag":435,"props":5361,"children":5362},{},[5363],{"type":398,"value":5364},"✅ Better: Use \"Unknown\" or \"Not Provided\" for categories",{"type":393,"tag":401,"props":5366,"children":5367},{},[5368],{"type":393,"tag":417,"props":5369,"children":5370},{},[5371],{"type":398,"value":5372},"2. Over-Aggressive Data Removal",{"type":393,"tag":431,"props":5374,"children":5375},{},[5376,5388,5393,5398],{"type":393,"tag":435,"props":5377,"children":5378},{},[5379,5381,5386],{"type":398,"value":5380},"❌ Wrong: ",{"type":393,"tag":439,"props":5382,"children":5384},{"className":5383},[],[5385],{"type":398,"value":1356},{"type":398,"value":5387}," removes ALL rows with ANY missing value",{"type":393,"tag":435,"props":5389,"children":5390},{},[5391],{"type":398,"value":5392},"❌ Wrong: Dropping important columns because they have some missing data",{"type":393,"tag":435,"props":5394,"children":5395},{},[5396],{"type":398,"value":5397},"✅ Better: Drop only when critical fields are missing",{"type":393,"tag":435,"props":5399,"children":5400},{},[5401,5403],{"type":398,"value":5402},"✅ Better: Use ",{"type":393,"tag":439,"props":5404,"children":5406},{"className":5405},[],[5407],{"type":398,"value":5408},".dropna(subset=['critical_column'])",{"type":393,"tag":401,"props":5410,"children":5411},{},[5412],{"type":393,"tag":417,"props":5413,"children":5414},{},[5415],{"type":398,"value":5416},"3. Ignoring Why Data Is Missing",{"type":393,"tag":431,"props":5418,"children":5419},{},[5420,5425,5430,5435],{"type":393,"tag":435,"props":5421,"children":5422},{},[5423],{"type":398,"value":5424},"❌ Wrong: Assuming all missing data is random",{"type":393,"tag":435,"props":5426,"children":5427},{},[5428],{"type":398,"value":5429},"❌ Wrong: Using same strategy for all missing values",{"type":393,"tag":435,"props":5431,"children":5432},{},[5433],{"type":398,"value":5434},"✅ Better: Understand if data is missing systematically",{"type":393,"tag":435,"props":5436,"children":5437},{},[5438],{"type":398,"value":5439},"✅ Better: Apply different strategies based on column importance",{"type":393,"tag":401,"props":5441,"children":5442},{},[5443],{"type":393,"tag":417,"props":5444,"children":5445},{},[5446],{"type":398,"value":5447},"4. Not Documenting Decisions",{"type":393,"tag":431,"props":5449,"children":5450},{},[5451,5456],{"type":393,"tag":435,"props":5452,"children":5453},{},[5454],{"type":398,"value":5455},"❌ Wrong: Making arbitrary choices without justification",{"type":393,"tag":435,"props":5457,"children":5458},{},[5459],{"type":398,"value":5460},"✅ Better: Document why you chose specific fill values or removal criteria",{"type":393,"tag":401,"props":5462,"children":5463},{},[5464,5468],{"type":393,"tag":417,"props":5465,"children":5466},{},[5467],{"type":398,"value":1582},{"type":398,"value":5469}," Your handling strategy should match your analysis goals and business context!",{"type":393,"tag":536,"props":5471,"children":5472},{},[5473],{"type":393,"tag":540,"props":5474,"children":5476},{"className":542,"code":5475,"language":544,"meta":6,"style":6},"import pandas as pd\nimport numpy as np\n\n# Survey responses demonstrating good vs bad practices\nresponses = pd.DataFrame({\n    'respondent': [1, 2, 3, 4, 5],\n    'age': [25, 30, None, 35, 28],\n    'income': [50000, None, 75000, 60000, 45000],\n    'satisfaction': [4, 5, None, 3, 4]\n})\n\nprint(\"📊 Original Data:\")\nprint(responses)\nprint()\n\nprint(\"✅ Good Practice: Context-Aware Handling\")\nprint()\n\n# Good practice: Fill income with median (reasonable assumption)\ngood_fill = responses.copy()\nmedian_income = responses['income'].median()\ngood_fill['income'] = good_fill['income'].fillna(median_income)\nprint(f\"Income filled with median (${median_income:,}):\")\nprint(good_fill[['respondent', 'income']])\nprint()\n\n# Good practice: Only drop if satisfaction missing (main metric)\ncritical_complete = responses.dropna(subset=['satisfaction'])\nprint(\"Kept data where satisfaction is available:\")\nprint(f\"Rows: {len(responses)} → {len(critical_complete)}\")\nprint(critical_complete)\n",[5477],{"type":393,"tag":439,"props":5478,"children":5479},{"__ignoreMap":6},[5480,5499,5518,5525,5533,5549,5601,5652,5708,5759,5766,5773,5793,5805,5816,5823,5843,5854,5861,5869,5886,5912,5946,5993,6022,6033,6040,6048,6086,6106,6163],{"type":393,"tag":550,"props":5481,"children":5482},{"class":552,"line":11},[5483,5487,5491,5495],{"type":393,"tag":550,"props":5484,"children":5485},{"style":556},[5486],{"type":398,"value":559},{"type":393,"tag":550,"props":5488,"children":5489},{"style":562},[5490],{"type":398,"value":565},{"type":393,"tag":550,"props":5492,"children":5493},{"style":556},[5494],{"type":398,"value":570},{"type":393,"tag":550,"props":5496,"children":5497},{"style":562},[5498],{"type":398,"value":575},{"type":393,"tag":550,"props":5500,"children":5501},{"class":552,"line":27},[5502,5506,5510,5514],{"type":393,"tag":550,"props":5503,"children":5504},{"style":556},[5505],{"type":398,"value":559},{"type":393,"tag":550,"props":5507,"children":5508},{"style":562},[5509],{"type":398,"value":587},{"type":393,"tag":550,"props":5511,"children":5512},{"style":556},[5513],{"type":398,"value":570},{"type":393,"tag":550,"props":5515,"children":5516},{"style":562},[5517],{"type":398,"value":596},{"type":393,"tag":550,"props":5519,"children":5520},{"class":552,"line":36},[5521],{"type":393,"tag":550,"props":5522,"children":5523},{"emptyLinePlaceholder":12},[5524],{"type":398,"value":604},{"type":393,"tag":550,"props":5526,"children":5527},{"class":552,"line":45},[5528],{"type":393,"tag":550,"props":5529,"children":5530},{"style":610},[5531],{"type":398,"value":5532},"# Survey responses demonstrating good vs bad practices\n",{"type":393,"tag":550,"props":5534,"children":5535},{"class":552,"line":54},[5536,5541,5545],{"type":393,"tag":550,"props":5537,"children":5538},{"style":562},[5539],{"type":398,"value":5540},"responses ",{"type":393,"tag":550,"props":5542,"children":5543},{"style":556},[5544],{"type":398,"value":626},{"type":393,"tag":550,"props":5546,"children":5547},{"style":562},[5548],{"type":398,"value":631},{"type":393,"tag":550,"props":5550,"children":5551},{"class":552,"line":63},[5552,5557,5561,5565,5569,5573,5577,5581,5585,5589,5593,5597],{"type":393,"tag":550,"props":5553,"children":5554},{"style":637},[5555],{"type":398,"value":5556},"    'respondent'",{"type":393,"tag":550,"props":5558,"children":5559},{"style":562},[5560],{"type":398,"value":645},{"type":393,"tag":550,"props":5562,"children":5563},{"style":648},[5564],{"type":398,"value":651},{"type":393,"tag":550,"props":5566,"children":5567},{"style":562},[5568],{"type":398,"value":656},{"type":393,"tag":550,"props":5570,"children":5571},{"style":648},[5572],{"type":398,"value":661},{"type":393,"tag":550,"props":5574,"children":5575},{"style":562},[5576],{"type":398,"value":656},{"type":393,"tag":550,"props":5578,"children":5579},{"style":648},[5580],{"type":398,"value":670},{"type":393,"tag":550,"props":5582,"children":5583},{"style":562},[5584],{"type":398,"value":656},{"type":393,"tag":550,"props":5586,"children":5587},{"style":648},[5588],{"type":398,"value":679},{"type":393,"tag":550,"props":5590,"children":5591},{"style":562},[5592],{"type":398,"value":656},{"type":393,"tag":550,"props":5594,"children":5595},{"style":648},[5596],{"type":398,"value":688},{"type":393,"tag":550,"props":5598,"children":5599},{"style":562},[5600],{"type":398,"value":693},{"type":393,"tag":550,"props":5602,"children":5603},{"class":552,"line":72},[5604,5608,5612,5616,5620,5624,5628,5632,5636,5640,5644,5648],{"type":393,"tag":550,"props":5605,"children":5606},{"style":637},[5607],{"type":398,"value":757},{"type":393,"tag":550,"props":5609,"children":5610},{"style":562},[5611],{"type":398,"value":645},{"type":393,"tag":550,"props":5613,"children":5614},{"style":648},[5615],{"type":398,"value":766},{"type":393,"tag":550,"props":5617,"children":5618},{"style":562},[5619],{"type":398,"value":656},{"type":393,"tag":550,"props":5621,"children":5622},{"style":648},[5623],{"type":398,"value":1894},{"type":393,"tag":550,"props":5625,"children":5626},{"style":562},[5627],{"type":398,"value":656},{"type":393,"tag":550,"props":5629,"children":5630},{"style":648},[5631],{"type":398,"value":455},{"type":393,"tag":550,"props":5633,"children":5634},{"style":562},[5635],{"type":398,"value":656},{"type":393,"tag":550,"props":5637,"children":5638},{"style":648},[5639],{"type":398,"value":783},{"type":393,"tag":550,"props":5641,"children":5642},{"style":562},[5643],{"type":398,"value":656},{"type":393,"tag":550,"props":5645,"children":5646},{"style":648},[5647],{"type":398,"value":792},{"type":393,"tag":550,"props":5649,"children":5650},{"style":562},[5651],{"type":398,"value":693},{"type":393,"tag":550,"props":5653,"children":5654},{"class":552,"line":83},[5655,5660,5664,5669,5673,5677,5681,5686,5690,5695,5699,5704],{"type":393,"tag":550,"props":5656,"children":5657},{"style":637},[5658],{"type":398,"value":5659},"    'income'",{"type":393,"tag":550,"props":5661,"children":5662},{"style":562},[5663],{"type":398,"value":645},{"type":393,"tag":550,"props":5665,"children":5666},{"style":648},[5667],{"type":398,"value":5668},"50000",{"type":393,"tag":550,"props":5670,"children":5671},{"style":562},[5672],{"type":398,"value":656},{"type":393,"tag":550,"props":5674,"children":5675},{"style":648},[5676],{"type":398,"value":455},{"type":393,"tag":550,"props":5678,"children":5679},{"style":562},[5680],{"type":398,"value":656},{"type":393,"tag":550,"props":5682,"children":5683},{"style":648},[5684],{"type":398,"value":5685},"75000",{"type":393,"tag":550,"props":5687,"children":5688},{"style":562},[5689],{"type":398,"value":656},{"type":393,"tag":550,"props":5691,"children":5692},{"style":648},[5693],{"type":398,"value":5694},"60000",{"type":393,"tag":550,"props":5696,"children":5697},{"style":562},[5698],{"type":398,"value":656},{"type":393,"tag":550,"props":5700,"children":5701},{"style":648},[5702],{"type":398,"value":5703},"45000",{"type":393,"tag":550,"props":5705,"children":5706},{"style":562},[5707],{"type":398,"value":693},{"type":393,"tag":550,"props":5709,"children":5710},{"class":552,"line":92},[5711,5715,5719,5723,5727,5731,5735,5739,5743,5747,5751,5755],{"type":393,"tag":550,"props":5712,"children":5713},{"style":637},[5714],{"type":398,"value":813},{"type":393,"tag":550,"props":5716,"children":5717},{"style":562},[5718],{"type":398,"value":645},{"type":393,"tag":550,"props":5720,"children":5721},{"style":648},[5722],{"type":398,"value":679},{"type":393,"tag":550,"props":5724,"children":5725},{"style":562},[5726],{"type":398,"value":656},{"type":393,"tag":550,"props":5728,"children":5729},{"style":648},[5730],{"type":398,"value":688},{"type":393,"tag":550,"props":5732,"children":5733},{"style":562},[5734],{"type":398,"value":656},{"type":393,"tag":550,"props":5736,"children":5737},{"style":648},[5738],{"type":398,"value":455},{"type":393,"tag":550,"props":5740,"children":5741},{"style":562},[5742],{"type":398,"value":656},{"type":393,"tag":550,"props":5744,"children":5745},{"style":648},[5746],{"type":398,"value":670},{"type":393,"tag":550,"props":5748,"children":5749},{"style":562},[5750],{"type":398,"value":656},{"type":393,"tag":550,"props":5752,"children":5753},{"style":648},[5754],{"type":398,"value":679},{"type":393,"tag":550,"props":5756,"children":5757},{"style":562},[5758],{"type":398,"value":914},{"type":393,"tag":550,"props":5760,"children":5761},{"class":552,"line":101},[5762],{"type":393,"tag":550,"props":5763,"children":5764},{"style":562},[5765],{"type":398,"value":922},{"type":393,"tag":550,"props":5767,"children":5768},{"class":552,"line":110},[5769],{"type":393,"tag":550,"props":5770,"children":5771},{"emptyLinePlaceholder":12},[5772],{"type":398,"value":604},{"type":393,"tag":550,"props":5774,"children":5775},{"class":552,"line":121},[5776,5780,5784,5789],{"type":393,"tag":550,"props":5777,"children":5778},{"style":648},[5779],{"type":398,"value":937},{"type":393,"tag":550,"props":5781,"children":5782},{"style":562},[5783],{"type":398,"value":942},{"type":393,"tag":550,"props":5785,"children":5786},{"style":637},[5787],{"type":398,"value":5788},"\"📊 Original Data:\"",{"type":393,"tag":550,"props":5790,"children":5791},{"style":562},[5792],{"type":398,"value":952},{"type":393,"tag":550,"props":5794,"children":5795},{"class":552,"line":130},[5796,5800],{"type":393,"tag":550,"props":5797,"children":5798},{"style":648},[5799],{"type":398,"value":937},{"type":393,"tag":550,"props":5801,"children":5802},{"style":562},[5803],{"type":398,"value":5804},"(responses)\n",{"type":393,"tag":550,"props":5806,"children":5807},{"class":552,"line":139},[5808,5812],{"type":393,"tag":550,"props":5809,"children":5810},{"style":648},[5811],{"type":398,"value":937},{"type":393,"tag":550,"props":5813,"children":5814},{"style":562},[5815],{"type":398,"value":976},{"type":393,"tag":550,"props":5817,"children":5818},{"class":552,"line":148},[5819],{"type":393,"tag":550,"props":5820,"children":5821},{"emptyLinePlaceholder":12},[5822],{"type":398,"value":604},{"type":393,"tag":550,"props":5824,"children":5825},{"class":552,"line":159},[5826,5830,5834,5839],{"type":393,"tag":550,"props":5827,"children":5828},{"style":648},[5829],{"type":398,"value":937},{"type":393,"tag":550,"props":5831,"children":5832},{"style":562},[5833],{"type":398,"value":942},{"type":393,"tag":550,"props":5835,"children":5836},{"style":637},[5837],{"type":398,"value":5838},"\"✅ Good Practice: Context-Aware Handling\"",{"type":393,"tag":550,"props":5840,"children":5841},{"style":562},[5842],{"type":398,"value":952},{"type":393,"tag":550,"props":5844,"children":5845},{"class":552,"line":168},[5846,5850],{"type":393,"tag":550,"props":5847,"children":5848},{"style":648},[5849],{"type":398,"value":937},{"type":393,"tag":550,"props":5851,"children":5852},{"style":562},[5853],{"type":398,"value":976},{"type":393,"tag":550,"props":5855,"children":5856},{"class":552,"line":177},[5857],{"type":393,"tag":550,"props":5858,"children":5859},{"emptyLinePlaceholder":12},[5860],{"type":398,"value":604},{"type":393,"tag":550,"props":5862,"children":5863},{"class":552,"line":186},[5864],{"type":393,"tag":550,"props":5865,"children":5866},{"style":610},[5867],{"type":398,"value":5868},"# Good practice: Fill income with median (reasonable assumption)\n",{"type":393,"tag":550,"props":5870,"children":5871},{"class":552,"line":197},[5872,5877,5881],{"type":393,"tag":550,"props":5873,"children":5874},{"style":562},[5875],{"type":398,"value":5876},"good_fill ",{"type":393,"tag":550,"props":5878,"children":5879},{"style":556},[5880],{"type":398,"value":626},{"type":393,"tag":550,"props":5882,"children":5883},{"style":562},[5884],{"type":398,"value":5885}," responses.copy()\n",{"type":393,"tag":550,"props":5887,"children":5888},{"class":552,"line":206},[5889,5894,5898,5903,5908],{"type":393,"tag":550,"props":5890,"children":5891},{"style":562},[5892],{"type":398,"value":5893},"median_income ",{"type":393,"tag":550,"props":5895,"children":5896},{"style":556},[5897],{"type":398,"value":626},{"type":393,"tag":550,"props":5899,"children":5900},{"style":562},[5901],{"type":398,"value":5902}," responses[",{"type":393,"tag":550,"props":5904,"children":5905},{"style":637},[5906],{"type":398,"value":5907},"'income'",{"type":393,"tag":550,"props":5909,"children":5910},{"style":562},[5911],{"type":398,"value":3915},{"type":393,"tag":550,"props":5913,"children":5914},{"class":552,"line":215},[5915,5920,5924,5928,5932,5937,5941],{"type":393,"tag":550,"props":5916,"children":5917},{"style":562},[5918],{"type":398,"value":5919},"good_fill[",{"type":393,"tag":550,"props":5921,"children":5922},{"style":637},[5923],{"type":398,"value":5907},{"type":393,"tag":550,"props":5925,"children":5926},{"style":562},[5927],{"type":398,"value":2862},{"type":393,"tag":550,"props":5929,"children":5930},{"style":556},[5931],{"type":398,"value":626},{"type":393,"tag":550,"props":5933,"children":5934},{"style":562},[5935],{"type":398,"value":5936}," good_fill[",{"type":393,"tag":550,"props":5938,"children":5939},{"style":637},[5940],{"type":398,"value":5907},{"type":393,"tag":550,"props":5942,"children":5943},{"style":562},[5944],{"type":398,"value":5945},"].fillna(median_income)\n",{"type":393,"tag":550,"props":5947,"children":5948},{"class":552,"line":224},[5949,5953,5957,5961,5966,5970,5975,5980,5984,5989],{"type":393,"tag":550,"props":5950,"children":5951},{"style":648},[5952],{"type":398,"value":937},{"type":393,"tag":550,"props":5954,"children":5955},{"style":562},[5956],{"type":398,"value":942},{"type":393,"tag":550,"props":5958,"children":5959},{"style":556},[5960],{"type":398,"value":1157},{"type":393,"tag":550,"props":5962,"children":5963},{"style":637},[5964],{"type":398,"value":5965},"\"Income filled with median ($",{"type":393,"tag":550,"props":5967,"children":5968},{"style":648},[5969],{"type":398,"value":1167},{"type":393,"tag":550,"props":5971,"children":5972},{"style":562},[5973],{"type":398,"value":5974},"median_income",{"type":393,"tag":550,"props":5976,"children":5977},{"style":556},[5978],{"type":398,"value":5979},":,",{"type":393,"tag":550,"props":5981,"children":5982},{"style":648},[5983],{"type":398,"value":1177},{"type":393,"tag":550,"props":5985,"children":5986},{"style":637},[5987],{"type":398,"value":5988},"):\"",{"type":393,"tag":550,"props":5990,"children":5991},{"style":562},[5992],{"type":398,"value":952},{"type":393,"tag":550,"props":5994,"children":5995},{"class":552,"line":233},[5996,6000,6005,6010,6014,6018],{"type":393,"tag":550,"props":5997,"children":5998},{"style":648},[5999],{"type":398,"value":937},{"type":393,"tag":550,"props":6001,"children":6002},{"style":562},[6003],{"type":398,"value":6004},"(good_fill[[",{"type":393,"tag":550,"props":6006,"children":6007},{"style":637},[6008],{"type":398,"value":6009},"'respondent'",{"type":393,"tag":550,"props":6011,"children":6012},{"style":562},[6013],{"type":398,"value":656},{"type":393,"tag":550,"props":6015,"children":6016},{"style":637},[6017],{"type":398,"value":5907},{"type":393,"tag":550,"props":6019,"children":6020},{"style":562},[6021],{"type":398,"value":3199},{"type":393,"tag":550,"props":6023,"children":6024},{"class":552,"line":244},[6025,6029],{"type":393,"tag":550,"props":6026,"children":6027},{"style":648},[6028],{"type":398,"value":937},{"type":393,"tag":550,"props":6030,"children":6031},{"style":562},[6032],{"type":398,"value":976},{"type":393,"tag":550,"props":6034,"children":6035},{"class":552,"line":253},[6036],{"type":393,"tag":550,"props":6037,"children":6038},{"emptyLinePlaceholder":12},[6039],{"type":398,"value":604},{"type":393,"tag":550,"props":6041,"children":6042},{"class":552,"line":262},[6043],{"type":393,"tag":550,"props":6044,"children":6045},{"style":610},[6046],{"type":398,"value":6047},"# Good practice: Only drop if satisfaction missing (main metric)\n",{"type":393,"tag":550,"props":6049,"children":6050},{"class":552,"line":271},[6051,6056,6060,6065,6069,6073,6077,6082],{"type":393,"tag":550,"props":6052,"children":6053},{"style":562},[6054],{"type":398,"value":6055},"critical_complete ",{"type":393,"tag":550,"props":6057,"children":6058},{"style":556},[6059],{"type":398,"value":626},{"type":393,"tag":550,"props":6061,"children":6062},{"style":562},[6063],{"type":398,"value":6064}," responses.dropna(",{"type":393,"tag":550,"props":6066,"children":6067},{"style":2167},[6068],{"type":398,"value":2170},{"type":393,"tag":550,"props":6070,"children":6071},{"style":556},[6072],{"type":398,"value":626},{"type":393,"tag":550,"props":6074,"children":6075},{"style":562},[6076],{"type":398,"value":2179},{"type":393,"tag":550,"props":6078,"children":6079},{"style":637},[6080],{"type":398,"value":6081},"'satisfaction'",{"type":393,"tag":550,"props":6083,"children":6084},{"style":562},[6085],{"type":398,"value":2189},{"type":393,"tag":550,"props":6087,"children":6088},{"class":552,"line":281},[6089,6093,6097,6102],{"type":393,"tag":550,"props":6090,"children":6091},{"style":648},[6092],{"type":398,"value":937},{"type":393,"tag":550,"props":6094,"children":6095},{"style":562},[6096],{"type":398,"value":942},{"type":393,"tag":550,"props":6098,"children":6099},{"style":637},[6100],{"type":398,"value":6101},"\"Kept data where satisfaction is available:\"",{"type":393,"tag":550,"props":6103,"children":6104},{"style":562},[6105],{"type":398,"value":952},{"type":393,"tag":550,"props":6107,"children":6108},{"class":552,"line":290},[6109,6113,6117,6121,6125,6129,6134,6138,6142,6146,6151,6155,6159],{"type":393,"tag":550,"props":6110,"children":6111},{"style":648},[6112],{"type":398,"value":937},{"type":393,"tag":550,"props":6114,"children":6115},{"style":562},[6116],{"type":398,"value":942},{"type":393,"tag":550,"props":6118,"children":6119},{"style":556},[6120],{"type":398,"value":1157},{"type":393,"tag":550,"props":6122,"children":6123},{"style":637},[6124],{"type":398,"value":2069},{"type":393,"tag":550,"props":6126,"children":6127},{"style":648},[6128],{"type":398,"value":2074},{"type":393,"tag":550,"props":6130,"children":6131},{"style":562},[6132],{"type":398,"value":6133},"(responses)",{"type":393,"tag":550,"props":6135,"children":6136},{"style":648},[6137],{"type":398,"value":1177},{"type":393,"tag":550,"props":6139,"children":6140},{"style":637},[6141],{"type":398,"value":2088},{"type":393,"tag":550,"props":6143,"children":6144},{"style":648},[6145],{"type":398,"value":2074},{"type":393,"tag":550,"props":6147,"children":6148},{"style":562},[6149],{"type":398,"value":6150},"(critical_complete)",{"type":393,"tag":550,"props":6152,"children":6153},{"style":648},[6154],{"type":398,"value":1177},{"type":393,"tag":550,"props":6156,"children":6157},{"style":637},[6158],{"type":398,"value":1182},{"type":393,"tag":550,"props":6160,"children":6161},{"style":562},[6162],{"type":398,"value":952},{"type":393,"tag":550,"props":6164,"children":6165},{"class":552,"line":299},[6166,6170],{"type":393,"tag":550,"props":6167,"children":6168},{"style":648},[6169],{"type":398,"value":937},{"type":393,"tag":550,"props":6171,"children":6172},{"style":562},[6173],{"type":398,"value":6174},"(critical_complete)\n",{"type":393,"tag":524,"props":6176,"children":6178},{"id":6177},"️-missing-data-workflow",[6179],{"type":398,"value":6180},"🛠️ Missing Data Workflow",{"type":393,"tag":401,"props":6182,"children":6183},{},[6184],{"type":398,"value":6185},"A systematic approach to handling missing data:",{"type":393,"tag":536,"props":6187,"children":6188},{},[6189],{"type":393,"tag":540,"props":6190,"children":6192},{"className":542,"code":6191,"language":544,"meta":6,"style":6},"import pandas as pd\nimport numpy as np\n\n# Employee dataset for workflow demo\nemployees = pd.DataFrame({\n    'emp_id': [1, 2, 3, 4, 5, 6],\n    'name': ['Alice', 'Bob', None, 'Diana', 'Eve', 'Frank'],\n    'department': ['Sales', 'IT', 'Sales', None, 'HR', 'IT'],\n    'salary': [50000, 75000, 55000, None, 48000, 70000],\n    'start_date': ['2020-01', None, '2019-03', '2021-06', '2020-08', '2018-12'],\n    'performance': [4.2, None, 4.5, 3.8, 4.0, None]\n})\n\nprint(\"🛠️ Missing Data Workflow:\")\nprint()\nprint(\"Step 1: Assess the situation\")\nprint(employees)\nprint()\n\nprint(\"Step 2: Understand missing patterns\")\nprint(\"Missing values by column:\")\nprint(employees.isnull().sum())\nprint()\n\nprint(\"Step 3: Apply appropriate strategies\")\ncleaned = employees.copy()\n\n# Strategy for each column\nprint(\"Name: Remove rows (critical field)\")\ncleaned = cleaned.dropna(subset=['name'])\nprint(f\"Rows after name cleaning: {len(cleaned)}\")\n\nprint(\"Department: Fill with 'TBD' (to be determined)\")\ncleaned['department'] = cleaned['department'].fillna('TBD')\n\nprint(\"Salary: Fill with department average\")\ndept_avg = cleaned.groupby('department')['salary'].mean()\nfor dept in cleaned['department'].unique():\n    if dept in dept_avg:\n        mask = (cleaned['department'] == dept) & (cleaned['salary'].isnull())\n        cleaned.loc[mask, 'salary'] = dept_avg[dept]\n\nprint(\"Performance: Fill with median\")\ncleaned['performance'] = cleaned['performance'].fillna(cleaned['performance'].median())\n\nprint()\nprint(\"Final cleaned dataset:\")\nprint(cleaned)\nprint()\nprint(\"✅ All missing values handled appropriately!\")\n",[6193],{"type":393,"tag":439,"props":6194,"children":6195},{"__ignoreMap":6},[6196,6215,6234,6241,6249,6265,6326,6386,6449,6512,6577,6639,6646,6653,6673,6684,6704,6716,6727,6734,6754,6774,6786,6797,6804,6824,6841,6848,6856,6876,6913,6954,6961,6981,7024,7031,7051,7086,7117,7138,7190,7215,7222,7242,7284,7291,7302,7322,7334,7346],{"type":393,"tag":550,"props":6197,"children":6198},{"class":552,"line":11},[6199,6203,6207,6211],{"type":393,"tag":550,"props":6200,"children":6201},{"style":556},[6202],{"type":398,"value":559},{"type":393,"tag":550,"props":6204,"children":6205},{"style":562},[6206],{"type":398,"value":565},{"type":393,"tag":550,"props":6208,"children":6209},{"style":556},[6210],{"type":398,"value":570},{"type":393,"tag":550,"props":6212,"children":6213},{"style":562},[6214],{"type":398,"value":575},{"type":393,"tag":550,"props":6216,"children":6217},{"class":552,"line":27},[6218,6222,6226,6230],{"type":393,"tag":550,"props":6219,"children":6220},{"style":556},[6221],{"type":398,"value":559},{"type":393,"tag":550,"props":6223,"children":6224},{"style":562},[6225],{"type":398,"value":587},{"type":393,"tag":550,"props":6227,"children":6228},{"style":556},[6229],{"type":398,"value":570},{"type":393,"tag":550,"props":6231,"children":6232},{"style":562},[6233],{"type":398,"value":596},{"type":393,"tag":550,"props":6235,"children":6236},{"class":552,"line":36},[6237],{"type":393,"tag":550,"props":6238,"children":6239},{"emptyLinePlaceholder":12},[6240],{"type":398,"value":604},{"type":393,"tag":550,"props":6242,"children":6243},{"class":552,"line":45},[6244],{"type":393,"tag":550,"props":6245,"children":6246},{"style":610},[6247],{"type":398,"value":6248},"# Employee dataset for workflow demo\n",{"type":393,"tag":550,"props":6250,"children":6251},{"class":552,"line":54},[6252,6257,6261],{"type":393,"tag":550,"props":6253,"children":6254},{"style":562},[6255],{"type":398,"value":6256},"employees ",{"type":393,"tag":550,"props":6258,"children":6259},{"style":556},[6260],{"type":398,"value":626},{"type":393,"tag":550,"props":6262,"children":6263},{"style":562},[6264],{"type":398,"value":631},{"type":393,"tag":550,"props":6266,"children":6267},{"class":552,"line":63},[6268,6273,6277,6281,6285,6289,6293,6297,6301,6305,6309,6313,6317,6322],{"type":393,"tag":550,"props":6269,"children":6270},{"style":637},[6271],{"type":398,"value":6272},"    'emp_id'",{"type":393,"tag":550,"props":6274,"children":6275},{"style":562},[6276],{"type":398,"value":645},{"type":393,"tag":550,"props":6278,"children":6279},{"style":648},[6280],{"type":398,"value":651},{"type":393,"tag":550,"props":6282,"children":6283},{"style":562},[6284],{"type":398,"value":656},{"type":393,"tag":550,"props":6286,"children":6287},{"style":648},[6288],{"type":398,"value":661},{"type":393,"tag":550,"props":6290,"children":6291},{"style":562},[6292],{"type":398,"value":656},{"type":393,"tag":550,"props":6294,"children":6295},{"style":648},[6296],{"type":398,"value":670},{"type":393,"tag":550,"props":6298,"children":6299},{"style":562},[6300],{"type":398,"value":656},{"type":393,"tag":550,"props":6302,"children":6303},{"style":648},[6304],{"type":398,"value":679},{"type":393,"tag":550,"props":6306,"children":6307},{"style":562},[6308],{"type":398,"value":656},{"type":393,"tag":550,"props":6310,"children":6311},{"style":648},[6312],{"type":398,"value":688},{"type":393,"tag":550,"props":6314,"children":6315},{"style":562},[6316],{"type":398,"value":656},{"type":393,"tag":550,"props":6318,"children":6319},{"style":648},[6320],{"type":398,"value":6321},"6",{"type":393,"tag":550,"props":6323,"children":6324},{"style":562},[6325],{"type":398,"value":693},{"type":393,"tag":550,"props":6327,"children":6328},{"class":552,"line":72},[6329,6333,6337,6341,6345,6349,6353,6357,6361,6365,6369,6373,6377,6382],{"type":393,"tag":550,"props":6330,"children":6331},{"style":637},[6332],{"type":398,"value":701},{"type":393,"tag":550,"props":6334,"children":6335},{"style":562},[6336],{"type":398,"value":645},{"type":393,"tag":550,"props":6338,"children":6339},{"style":637},[6340],{"type":398,"value":710},{"type":393,"tag":550,"props":6342,"children":6343},{"style":562},[6344],{"type":398,"value":656},{"type":393,"tag":550,"props":6346,"children":6347},{"style":637},[6348],{"type":398,"value":719},{"type":393,"tag":550,"props":6350,"children":6351},{"style":562},[6352],{"type":398,"value":656},{"type":393,"tag":550,"props":6354,"children":6355},{"style":648},[6356],{"type":398,"value":455},{"type":393,"tag":550,"props":6358,"children":6359},{"style":562},[6360],{"type":398,"value":656},{"type":393,"tag":550,"props":6362,"children":6363},{"style":637},[6364],{"type":398,"value":736},{"type":393,"tag":550,"props":6366,"children":6367},{"style":562},[6368],{"type":398,"value":656},{"type":393,"tag":550,"props":6370,"children":6371},{"style":637},[6372],{"type":398,"value":745},{"type":393,"tag":550,"props":6374,"children":6375},{"style":562},[6376],{"type":398,"value":656},{"type":393,"tag":550,"props":6378,"children":6379},{"style":637},[6380],{"type":398,"value":6381},"'Frank'",{"type":393,"tag":550,"props":6383,"children":6384},{"style":562},[6385],{"type":398,"value":693},{"type":393,"tag":550,"props":6387,"children":6388},{"class":552,"line":83},[6389,6394,6398,6403,6407,6412,6416,6420,6424,6428,6432,6437,6441,6445],{"type":393,"tag":550,"props":6390,"children":6391},{"style":637},[6392],{"type":398,"value":6393},"    'department'",{"type":393,"tag":550,"props":6395,"children":6396},{"style":562},[6397],{"type":398,"value":645},{"type":393,"tag":550,"props":6399,"children":6400},{"style":637},[6401],{"type":398,"value":6402},"'Sales'",{"type":393,"tag":550,"props":6404,"children":6405},{"style":562},[6406],{"type":398,"value":656},{"type":393,"tag":550,"props":6408,"children":6409},{"style":637},[6410],{"type":398,"value":6411},"'IT'",{"type":393,"tag":550,"props":6413,"children":6414},{"style":562},[6415],{"type":398,"value":656},{"type":393,"tag":550,"props":6417,"children":6418},{"style":637},[6419],{"type":398,"value":6402},{"type":393,"tag":550,"props":6421,"children":6422},{"style":562},[6423],{"type":398,"value":656},{"type":393,"tag":550,"props":6425,"children":6426},{"style":648},[6427],{"type":398,"value":455},{"type":393,"tag":550,"props":6429,"children":6430},{"style":562},[6431],{"type":398,"value":656},{"type":393,"tag":550,"props":6433,"children":6434},{"style":637},[6435],{"type":398,"value":6436},"'HR'",{"type":393,"tag":550,"props":6438,"children":6439},{"style":562},[6440],{"type":398,"value":656},{"type":393,"tag":550,"props":6442,"children":6443},{"style":637},[6444],{"type":398,"value":6411},{"type":393,"tag":550,"props":6446,"children":6447},{"style":562},[6448],{"type":398,"value":693},{"type":393,"tag":550,"props":6450,"children":6451},{"class":552,"line":92},[6452,6457,6461,6465,6469,6473,6477,6482,6486,6490,6494,6499,6503,6508],{"type":393,"tag":550,"props":6453,"children":6454},{"style":637},[6455],{"type":398,"value":6456},"    'salary'",{"type":393,"tag":550,"props":6458,"children":6459},{"style":562},[6460],{"type":398,"value":645},{"type":393,"tag":550,"props":6462,"children":6463},{"style":648},[6464],{"type":398,"value":5668},{"type":393,"tag":550,"props":6466,"children":6467},{"style":562},[6468],{"type":398,"value":656},{"type":393,"tag":550,"props":6470,"children":6471},{"style":648},[6472],{"type":398,"value":5685},{"type":393,"tag":550,"props":6474,"children":6475},{"style":562},[6476],{"type":398,"value":656},{"type":393,"tag":550,"props":6478,"children":6479},{"style":648},[6480],{"type":398,"value":6481},"55000",{"type":393,"tag":550,"props":6483,"children":6484},{"style":562},[6485],{"type":398,"value":656},{"type":393,"tag":550,"props":6487,"children":6488},{"style":648},[6489],{"type":398,"value":455},{"type":393,"tag":550,"props":6491,"children":6492},{"style":562},[6493],{"type":398,"value":656},{"type":393,"tag":550,"props":6495,"children":6496},{"style":648},[6497],{"type":398,"value":6498},"48000",{"type":393,"tag":550,"props":6500,"children":6501},{"style":562},[6502],{"type":398,"value":656},{"type":393,"tag":550,"props":6504,"children":6505},{"style":648},[6506],{"type":398,"value":6507},"70000",{"type":393,"tag":550,"props":6509,"children":6510},{"style":562},[6511],{"type":398,"value":693},{"type":393,"tag":550,"props":6513,"children":6514},{"class":552,"line":101},[6515,6520,6524,6529,6533,6537,6541,6546,6550,6555,6559,6564,6568,6573],{"type":393,"tag":550,"props":6516,"children":6517},{"style":637},[6518],{"type":398,"value":6519},"    'start_date'",{"type":393,"tag":550,"props":6521,"children":6522},{"style":562},[6523],{"type":398,"value":645},{"type":393,"tag":550,"props":6525,"children":6526},{"style":637},[6527],{"type":398,"value":6528},"'2020-01'",{"type":393,"tag":550,"props":6530,"children":6531},{"style":562},[6532],{"type":398,"value":656},{"type":393,"tag":550,"props":6534,"children":6535},{"style":648},[6536],{"type":398,"value":455},{"type":393,"tag":550,"props":6538,"children":6539},{"style":562},[6540],{"type":398,"value":656},{"type":393,"tag":550,"props":6542,"children":6543},{"style":637},[6544],{"type":398,"value":6545},"'2019-03'",{"type":393,"tag":550,"props":6547,"children":6548},{"style":562},[6549],{"type":398,"value":656},{"type":393,"tag":550,"props":6551,"children":6552},{"style":637},[6553],{"type":398,"value":6554},"'2021-06'",{"type":393,"tag":550,"props":6556,"children":6557},{"style":562},[6558],{"type":398,"value":656},{"type":393,"tag":550,"props":6560,"children":6561},{"style":637},[6562],{"type":398,"value":6563},"'2020-08'",{"type":393,"tag":550,"props":6565,"children":6566},{"style":562},[6567],{"type":398,"value":656},{"type":393,"tag":550,"props":6569,"children":6570},{"style":637},[6571],{"type":398,"value":6572},"'2018-12'",{"type":393,"tag":550,"props":6574,"children":6575},{"style":562},[6576],{"type":398,"value":693},{"type":393,"tag":550,"props":6578,"children":6579},{"class":552,"line":110},[6580,6585,6589,6593,6597,6601,6605,6609,6613,6618,6622,6627,6631,6635],{"type":393,"tag":550,"props":6581,"children":6582},{"style":637},[6583],{"type":398,"value":6584},"    'performance'",{"type":393,"tag":550,"props":6586,"children":6587},{"style":562},[6588],{"type":398,"value":645},{"type":393,"tag":550,"props":6590,"children":6591},{"style":648},[6592],{"type":398,"value":1774},{"type":393,"tag":550,"props":6594,"children":6595},{"style":562},[6596],{"type":398,"value":656},{"type":393,"tag":550,"props":6598,"children":6599},{"style":648},[6600],{"type":398,"value":455},{"type":393,"tag":550,"props":6602,"children":6603},{"style":562},[6604],{"type":398,"value":656},{"type":393,"tag":550,"props":6606,"children":6607},{"style":648},[6608],{"type":398,"value":1748},{"type":393,"tag":550,"props":6610,"children":6611},{"style":562},[6612],{"type":398,"value":656},{"type":393,"tag":550,"props":6614,"children":6615},{"style":648},[6616],{"type":398,"value":6617},"3.8",{"type":393,"tag":550,"props":6619,"children":6620},{"style":562},[6621],{"type":398,"value":656},{"type":393,"tag":550,"props":6623,"children":6624},{"style":648},[6625],{"type":398,"value":6626},"4.0",{"type":393,"tag":550,"props":6628,"children":6629},{"style":562},[6630],{"type":398,"value":656},{"type":393,"tag":550,"props":6632,"children":6633},{"style":648},[6634],{"type":398,"value":455},{"type":393,"tag":550,"props":6636,"children":6637},{"style":562},[6638],{"type":398,"value":914},{"type":393,"tag":550,"props":6640,"children":6641},{"class":552,"line":121},[6642],{"type":393,"tag":550,"props":6643,"children":6644},{"style":562},[6645],{"type":398,"value":922},{"type":393,"tag":550,"props":6647,"children":6648},{"class":552,"line":130},[6649],{"type":393,"tag":550,"props":6650,"children":6651},{"emptyLinePlaceholder":12},[6652],{"type":398,"value":604},{"type":393,"tag":550,"props":6654,"children":6655},{"class":552,"line":139},[6656,6660,6664,6669],{"type":393,"tag":550,"props":6657,"children":6658},{"style":648},[6659],{"type":398,"value":937},{"type":393,"tag":550,"props":6661,"children":6662},{"style":562},[6663],{"type":398,"value":942},{"type":393,"tag":550,"props":6665,"children":6666},{"style":637},[6667],{"type":398,"value":6668},"\"🛠️ Missing Data Workflow:\"",{"type":393,"tag":550,"props":6670,"children":6671},{"style":562},[6672],{"type":398,"value":952},{"type":393,"tag":550,"props":6674,"children":6675},{"class":552,"line":148},[6676,6680],{"type":393,"tag":550,"props":6677,"children":6678},{"style":648},[6679],{"type":398,"value":937},{"type":393,"tag":550,"props":6681,"children":6682},{"style":562},[6683],{"type":398,"value":976},{"type":393,"tag":550,"props":6685,"children":6686},{"class":552,"line":159},[6687,6691,6695,6700],{"type":393,"tag":550,"props":6688,"children":6689},{"style":648},[6690],{"type":398,"value":937},{"type":393,"tag":550,"props":6692,"children":6693},{"style":562},[6694],{"type":398,"value":942},{"type":393,"tag":550,"props":6696,"children":6697},{"style":637},[6698],{"type":398,"value":6699},"\"Step 1: Assess the situation\"",{"type":393,"tag":550,"props":6701,"children":6702},{"style":562},[6703],{"type":398,"value":952},{"type":393,"tag":550,"props":6705,"children":6706},{"class":552,"line":168},[6707,6711],{"type":393,"tag":550,"props":6708,"children":6709},{"style":648},[6710],{"type":398,"value":937},{"type":393,"tag":550,"props":6712,"children":6713},{"style":562},[6714],{"type":398,"value":6715},"(employees)\n",{"type":393,"tag":550,"props":6717,"children":6718},{"class":552,"line":177},[6719,6723],{"type":393,"tag":550,"props":6720,"children":6721},{"style":648},[6722],{"type":398,"value":937},{"type":393,"tag":550,"props":6724,"children":6725},{"style":562},[6726],{"type":398,"value":976},{"type":393,"tag":550,"props":6728,"children":6729},{"class":552,"line":186},[6730],{"type":393,"tag":550,"props":6731,"children":6732},{"emptyLinePlaceholder":12},[6733],{"type":398,"value":604},{"type":393,"tag":550,"props":6735,"children":6736},{"class":552,"line":197},[6737,6741,6745,6750],{"type":393,"tag":550,"props":6738,"children":6739},{"style":648},[6740],{"type":398,"value":937},{"type":393,"tag":550,"props":6742,"children":6743},{"style":562},[6744],{"type":398,"value":942},{"type":393,"tag":550,"props":6746,"children":6747},{"style":637},[6748],{"type":398,"value":6749},"\"Step 2: Understand missing patterns\"",{"type":393,"tag":550,"props":6751,"children":6752},{"style":562},[6753],{"type":398,"value":952},{"type":393,"tag":550,"props":6755,"children":6756},{"class":552,"line":206},[6757,6761,6765,6770],{"type":393,"tag":550,"props":6758,"children":6759},{"style":648},[6760],{"type":398,"value":937},{"type":393,"tag":550,"props":6762,"children":6763},{"style":562},[6764],{"type":398,"value":942},{"type":393,"tag":550,"props":6766,"children":6767},{"style":637},[6768],{"type":398,"value":6769},"\"Missing values by column:\"",{"type":393,"tag":550,"props":6771,"children":6772},{"style":562},[6773],{"type":398,"value":952},{"type":393,"tag":550,"props":6775,"children":6776},{"class":552,"line":215},[6777,6781],{"type":393,"tag":550,"props":6778,"children":6779},{"style":648},[6780],{"type":398,"value":937},{"type":393,"tag":550,"props":6782,"children":6783},{"style":562},[6784],{"type":398,"value":6785},"(employees.isnull().sum())\n",{"type":393,"tag":550,"props":6787,"children":6788},{"class":552,"line":224},[6789,6793],{"type":393,"tag":550,"props":6790,"children":6791},{"style":648},[6792],{"type":398,"value":937},{"type":393,"tag":550,"props":6794,"children":6795},{"style":562},[6796],{"type":398,"value":976},{"type":393,"tag":550,"props":6798,"children":6799},{"class":552,"line":233},[6800],{"type":393,"tag":550,"props":6801,"children":6802},{"emptyLinePlaceholder":12},[6803],{"type":398,"value":604},{"type":393,"tag":550,"props":6805,"children":6806},{"class":552,"line":244},[6807,6811,6815,6820],{"type":393,"tag":550,"props":6808,"children":6809},{"style":648},[6810],{"type":398,"value":937},{"type":393,"tag":550,"props":6812,"children":6813},{"style":562},[6814],{"type":398,"value":942},{"type":393,"tag":550,"props":6816,"children":6817},{"style":637},[6818],{"type":398,"value":6819},"\"Step 3: Apply appropriate strategies\"",{"type":393,"tag":550,"props":6821,"children":6822},{"style":562},[6823],{"type":398,"value":952},{"type":393,"tag":550,"props":6825,"children":6826},{"class":552,"line":253},[6827,6832,6836],{"type":393,"tag":550,"props":6828,"children":6829},{"style":562},[6830],{"type":398,"value":6831},"cleaned ",{"type":393,"tag":550,"props":6833,"children":6834},{"style":556},[6835],{"type":398,"value":626},{"type":393,"tag":550,"props":6837,"children":6838},{"style":562},[6839],{"type":398,"value":6840}," employees.copy()\n",{"type":393,"tag":550,"props":6842,"children":6843},{"class":552,"line":262},[6844],{"type":393,"tag":550,"props":6845,"children":6846},{"emptyLinePlaceholder":12},[6847],{"type":398,"value":604},{"type":393,"tag":550,"props":6849,"children":6850},{"class":552,"line":271},[6851],{"type":393,"tag":550,"props":6852,"children":6853},{"style":610},[6854],{"type":398,"value":6855},"# Strategy for each column\n",{"type":393,"tag":550,"props":6857,"children":6858},{"class":552,"line":281},[6859,6863,6867,6872],{"type":393,"tag":550,"props":6860,"children":6861},{"style":648},[6862],{"type":398,"value":937},{"type":393,"tag":550,"props":6864,"children":6865},{"style":562},[6866],{"type":398,"value":942},{"type":393,"tag":550,"props":6868,"children":6869},{"style":637},[6870],{"type":398,"value":6871},"\"Name: Remove rows (critical field)\"",{"type":393,"tag":550,"props":6873,"children":6874},{"style":562},[6875],{"type":398,"value":952},{"type":393,"tag":550,"props":6877,"children":6878},{"class":552,"line":290},[6879,6883,6887,6892,6896,6900,6904,6909],{"type":393,"tag":550,"props":6880,"children":6881},{"style":562},[6882],{"type":398,"value":6831},{"type":393,"tag":550,"props":6884,"children":6885},{"style":556},[6886],{"type":398,"value":626},{"type":393,"tag":550,"props":6888,"children":6889},{"style":562},[6890],{"type":398,"value":6891}," cleaned.dropna(",{"type":393,"tag":550,"props":6893,"children":6894},{"style":2167},[6895],{"type":398,"value":2170},{"type":393,"tag":550,"props":6897,"children":6898},{"style":556},[6899],{"type":398,"value":626},{"type":393,"tag":550,"props":6901,"children":6902},{"style":562},[6903],{"type":398,"value":2179},{"type":393,"tag":550,"props":6905,"children":6906},{"style":637},[6907],{"type":398,"value":6908},"'name'",{"type":393,"tag":550,"props":6910,"children":6911},{"style":562},[6912],{"type":398,"value":2189},{"type":393,"tag":550,"props":6914,"children":6915},{"class":552,"line":299},[6916,6920,6924,6928,6933,6937,6942,6946,6950],{"type":393,"tag":550,"props":6917,"children":6918},{"style":648},[6919],{"type":398,"value":937},{"type":393,"tag":550,"props":6921,"children":6922},{"style":562},[6923],{"type":398,"value":942},{"type":393,"tag":550,"props":6925,"children":6926},{"style":556},[6927],{"type":398,"value":1157},{"type":393,"tag":550,"props":6929,"children":6930},{"style":637},[6931],{"type":398,"value":6932},"\"Rows after name cleaning: ",{"type":393,"tag":550,"props":6934,"children":6935},{"style":648},[6936],{"type":398,"value":2074},{"type":393,"tag":550,"props":6938,"children":6939},{"style":562},[6940],{"type":398,"value":6941},"(cleaned)",{"type":393,"tag":550,"props":6943,"children":6944},{"style":648},[6945],{"type":398,"value":1177},{"type":393,"tag":550,"props":6947,"children":6948},{"style":637},[6949],{"type":398,"value":1182},{"type":393,"tag":550,"props":6951,"children":6952},{"style":562},[6953],{"type":398,"value":952},{"type":393,"tag":550,"props":6955,"children":6956},{"class":552,"line":308},[6957],{"type":393,"tag":550,"props":6958,"children":6959},{"emptyLinePlaceholder":12},[6960],{"type":398,"value":604},{"type":393,"tag":550,"props":6962,"children":6963},{"class":552,"line":318},[6964,6968,6972,6977],{"type":393,"tag":550,"props":6965,"children":6966},{"style":648},[6967],{"type":398,"value":937},{"type":393,"tag":550,"props":6969,"children":6970},{"style":562},[6971],{"type":398,"value":942},{"type":393,"tag":550,"props":6973,"children":6974},{"style":637},[6975],{"type":398,"value":6976},"\"Department: Fill with 'TBD' (to be determined)\"",{"type":393,"tag":550,"props":6978,"children":6979},{"style":562},[6980],{"type":398,"value":952},{"type":393,"tag":550,"props":6982,"children":6983},{"class":552,"line":327},[6984,6989,6994,6998,7002,7007,7011,7015,7020],{"type":393,"tag":550,"props":6985,"children":6986},{"style":562},[6987],{"type":398,"value":6988},"cleaned[",{"type":393,"tag":550,"props":6990,"children":6991},{"style":637},[6992],{"type":398,"value":6993},"'department'",{"type":393,"tag":550,"props":6995,"children":6996},{"style":562},[6997],{"type":398,"value":2862},{"type":393,"tag":550,"props":6999,"children":7000},{"style":556},[7001],{"type":398,"value":626},{"type":393,"tag":550,"props":7003,"children":7004},{"style":562},[7005],{"type":398,"value":7006}," cleaned[",{"type":393,"tag":550,"props":7008,"children":7009},{"style":637},[7010],{"type":398,"value":6993},{"type":393,"tag":550,"props":7012,"children":7013},{"style":562},[7014],{"type":398,"value":2880},{"type":393,"tag":550,"props":7016,"children":7017},{"style":637},[7018],{"type":398,"value":7019},"'TBD'",{"type":393,"tag":550,"props":7021,"children":7022},{"style":562},[7023],{"type":398,"value":952},{"type":393,"tag":550,"props":7025,"children":7026},{"class":552,"line":336},[7027],{"type":393,"tag":550,"props":7028,"children":7029},{"emptyLinePlaceholder":12},[7030],{"type":398,"value":604},{"type":393,"tag":550,"props":7032,"children":7033},{"class":552,"line":346},[7034,7038,7042,7047],{"type":393,"tag":550,"props":7035,"children":7036},{"style":648},[7037],{"type":398,"value":937},{"type":393,"tag":550,"props":7039,"children":7040},{"style":562},[7041],{"type":398,"value":942},{"type":393,"tag":550,"props":7043,"children":7044},{"style":637},[7045],{"type":398,"value":7046},"\"Salary: Fill with department average\"",{"type":393,"tag":550,"props":7048,"children":7049},{"style":562},[7050],{"type":398,"value":952},{"type":393,"tag":550,"props":7052,"children":7053},{"class":552,"line":355},[7054,7059,7063,7068,7072,7077,7082],{"type":393,"tag":550,"props":7055,"children":7056},{"style":562},[7057],{"type":398,"value":7058},"dept_avg ",{"type":393,"tag":550,"props":7060,"children":7061},{"style":556},[7062],{"type":398,"value":626},{"type":393,"tag":550,"props":7064,"children":7065},{"style":562},[7066],{"type":398,"value":7067}," cleaned.groupby(",{"type":393,"tag":550,"props":7069,"children":7070},{"style":637},[7071],{"type":398,"value":6993},{"type":393,"tag":550,"props":7073,"children":7074},{"style":562},[7075],{"type":398,"value":7076},")[",{"type":393,"tag":550,"props":7078,"children":7079},{"style":637},[7080],{"type":398,"value":7081},"'salary'",{"type":393,"tag":550,"props":7083,"children":7084},{"style":562},[7085],{"type":398,"value":2980},{"type":393,"tag":550,"props":7087,"children":7088},{"class":552,"line":364},[7089,7094,7099,7104,7108,7112],{"type":393,"tag":550,"props":7090,"children":7091},{"style":556},[7092],{"type":398,"value":7093},"for",{"type":393,"tag":550,"props":7095,"children":7096},{"style":562},[7097],{"type":398,"value":7098}," dept ",{"type":393,"tag":550,"props":7100,"children":7101},{"style":556},[7102],{"type":398,"value":7103},"in",{"type":393,"tag":550,"props":7105,"children":7106},{"style":562},[7107],{"type":398,"value":7006},{"type":393,"tag":550,"props":7109,"children":7110},{"style":637},[7111],{"type":398,"value":6993},{"type":393,"tag":550,"props":7113,"children":7114},{"style":562},[7115],{"type":398,"value":7116},"].unique():\n",{"type":393,"tag":550,"props":7118,"children":7119},{"class":552,"line":374},[7120,7125,7129,7133],{"type":393,"tag":550,"props":7121,"children":7122},{"style":556},[7123],{"type":398,"value":7124},"    if",{"type":393,"tag":550,"props":7126,"children":7127},{"style":562},[7128],{"type":398,"value":7098},{"type":393,"tag":550,"props":7130,"children":7131},{"style":556},[7132],{"type":398,"value":7103},{"type":393,"tag":550,"props":7134,"children":7135},{"style":562},[7136],{"type":398,"value":7137}," dept_avg:\n",{"type":393,"tag":550,"props":7139,"children":7140},{"class":552,"line":383},[7141,7146,7150,7155,7159,7163,7167,7172,7177,7181,7185],{"type":393,"tag":550,"props":7142,"children":7143},{"style":562},[7144],{"type":398,"value":7145},"        mask ",{"type":393,"tag":550,"props":7147,"children":7148},{"style":556},[7149],{"type":398,"value":626},{"type":393,"tag":550,"props":7151,"children":7152},{"style":562},[7153],{"type":398,"value":7154}," (cleaned[",{"type":393,"tag":550,"props":7156,"children":7157},{"style":637},[7158],{"type":398,"value":6993},{"type":393,"tag":550,"props":7160,"children":7161},{"style":562},[7162],{"type":398,"value":2862},{"type":393,"tag":550,"props":7164,"children":7165},{"style":556},[7166],{"type":398,"value":5064},{"type":393,"tag":550,"props":7168,"children":7169},{"style":562},[7170],{"type":398,"value":7171}," dept) ",{"type":393,"tag":550,"props":7173,"children":7174},{"style":556},[7175],{"type":398,"value":7176},"&",{"type":393,"tag":550,"props":7178,"children":7179},{"style":562},[7180],{"type":398,"value":7154},{"type":393,"tag":550,"props":7182,"children":7183},{"style":637},[7184],{"type":398,"value":7081},{"type":393,"tag":550,"props":7186,"children":7187},{"style":562},[7188],{"type":398,"value":7189},"].isnull())\n",{"type":393,"tag":550,"props":7191,"children":7192},{"class":552,"line":4153},[7193,7198,7202,7206,7210],{"type":393,"tag":550,"props":7194,"children":7195},{"style":562},[7196],{"type":398,"value":7197},"        cleaned.loc[mask, ",{"type":393,"tag":550,"props":7199,"children":7200},{"style":637},[7201],{"type":398,"value":7081},{"type":393,"tag":550,"props":7203,"children":7204},{"style":562},[7205],{"type":398,"value":2862},{"type":393,"tag":550,"props":7207,"children":7208},{"style":556},[7209],{"type":398,"value":626},{"type":393,"tag":550,"props":7211,"children":7212},{"style":562},[7213],{"type":398,"value":7214}," dept_avg[dept]\n",{"type":393,"tag":550,"props":7216,"children":7217},{"class":552,"line":4171},[7218],{"type":393,"tag":550,"props":7219,"children":7220},{"emptyLinePlaceholder":12},[7221],{"type":398,"value":604},{"type":393,"tag":550,"props":7223,"children":7224},{"class":552,"line":4197},[7225,7229,7233,7238],{"type":393,"tag":550,"props":7226,"children":7227},{"style":648},[7228],{"type":398,"value":937},{"type":393,"tag":550,"props":7230,"children":7231},{"style":562},[7232],{"type":398,"value":942},{"type":393,"tag":550,"props":7234,"children":7235},{"style":637},[7236],{"type":398,"value":7237},"\"Performance: Fill with median\"",{"type":393,"tag":550,"props":7239,"children":7240},{"style":562},[7241],{"type":398,"value":952},{"type":393,"tag":550,"props":7243,"children":7244},{"class":552,"line":4219},[7245,7249,7254,7258,7262,7266,7270,7275,7279],{"type":393,"tag":550,"props":7246,"children":7247},{"style":562},[7248],{"type":398,"value":6988},{"type":393,"tag":550,"props":7250,"children":7251},{"style":637},[7252],{"type":398,"value":7253},"'performance'",{"type":393,"tag":550,"props":7255,"children":7256},{"style":562},[7257],{"type":398,"value":2862},{"type":393,"tag":550,"props":7259,"children":7260},{"style":556},[7261],{"type":398,"value":626},{"type":393,"tag":550,"props":7263,"children":7264},{"style":562},[7265],{"type":398,"value":7006},{"type":393,"tag":550,"props":7267,"children":7268},{"style":637},[7269],{"type":398,"value":7253},{"type":393,"tag":550,"props":7271,"children":7272},{"style":562},[7273],{"type":398,"value":7274},"].fillna(cleaned[",{"type":393,"tag":550,"props":7276,"children":7277},{"style":637},[7278],{"type":398,"value":7253},{"type":393,"tag":550,"props":7280,"children":7281},{"style":562},[7282],{"type":398,"value":7283},"].median())\n",{"type":393,"tag":550,"props":7285,"children":7286},{"class":552,"line":4232},[7287],{"type":393,"tag":550,"props":7288,"children":7289},{"emptyLinePlaceholder":12},[7290],{"type":398,"value":604},{"type":393,"tag":550,"props":7292,"children":7293},{"class":552,"line":4249},[7294,7298],{"type":393,"tag":550,"props":7295,"children":7296},{"style":648},[7297],{"type":398,"value":937},{"type":393,"tag":550,"props":7299,"children":7300},{"style":562},[7301],{"type":398,"value":976},{"type":393,"tag":550,"props":7303,"children":7304},{"class":552,"line":4284},[7305,7309,7313,7318],{"type":393,"tag":550,"props":7306,"children":7307},{"style":648},[7308],{"type":398,"value":937},{"type":393,"tag":550,"props":7310,"children":7311},{"style":562},[7312],{"type":398,"value":942},{"type":393,"tag":550,"props":7314,"children":7315},{"style":637},[7316],{"type":398,"value":7317},"\"Final cleaned dataset:\"",{"type":393,"tag":550,"props":7319,"children":7320},{"style":562},[7321],{"type":398,"value":952},{"type":393,"tag":550,"props":7323,"children":7324},{"class":552,"line":4305},[7325,7329],{"type":393,"tag":550,"props":7326,"children":7327},{"style":648},[7328],{"type":398,"value":937},{"type":393,"tag":550,"props":7330,"children":7331},{"style":562},[7332],{"type":398,"value":7333},"(cleaned)\n",{"type":393,"tag":550,"props":7335,"children":7337},{"class":552,"line":7336},49,[7338,7342],{"type":393,"tag":550,"props":7339,"children":7340},{"style":648},[7341],{"type":398,"value":937},{"type":393,"tag":550,"props":7343,"children":7344},{"style":562},[7345],{"type":398,"value":976},{"type":393,"tag":550,"props":7347,"children":7349},{"class":552,"line":7348},50,[7350,7354,7358,7363],{"type":393,"tag":550,"props":7351,"children":7352},{"style":648},[7353],{"type":398,"value":937},{"type":393,"tag":550,"props":7355,"children":7356},{"style":562},[7357],{"type":398,"value":942},{"type":393,"tag":550,"props":7359,"children":7360},{"style":637},[7361],{"type":398,"value":7362},"\"✅ All missing values handled appropriately!\"",{"type":393,"tag":550,"props":7364,"children":7365},{"style":562},[7366],{"type":398,"value":952},{"type":393,"tag":524,"props":7368,"children":7370},{"id":7369},"key-takeaways",[7371],{"type":398,"value":7372},"🎯 Key Takeaways",{"type":393,"tag":407,"props":7374,"children":7377},{"emoji":409,"title":7375,"type":7376},"Missing Data Mastery","success",[7378,7386,7420,7428,7463,7471,7516,7524,7552,7560,7583],{"type":393,"tag":401,"props":7379,"children":7380},{},[7381],{"type":393,"tag":417,"props":7382,"children":7383},{},[7384],{"type":398,"value":7385},"Assessment First:",{"type":393,"tag":431,"props":7387,"children":7388},{},[7389,7410,7415],{"type":393,"tag":435,"props":7390,"children":7391},{},[7392,7394,7400,7402,7408],{"type":398,"value":7393},"Use ",{"type":393,"tag":439,"props":7395,"children":7397},{"className":7396},[],[7398],{"type":398,"value":7399},".isnull()",{"type":398,"value":7401}," and ",{"type":393,"tag":439,"props":7403,"children":7405},{"className":7404},[],[7406],{"type":398,"value":7407},".isnull().sum()",{"type":398,"value":7409}," to identify missing data",{"type":393,"tag":435,"props":7411,"children":7412},{},[7413],{"type":398,"value":7414},"Calculate percentages to understand the scope",{"type":393,"tag":435,"props":7416,"children":7417},{},[7418],{"type":398,"value":7419},"Look for patterns in what's missing",{"type":393,"tag":401,"props":7421,"children":7422},{},[7423],{"type":393,"tag":417,"props":7424,"children":7425},{},[7426],{"type":398,"value":7427},"Removal Strategies:",{"type":393,"tag":431,"props":7429,"children":7430},{},[7431,7441,7452],{"type":393,"tag":435,"props":7432,"children":7433},{},[7434,7439],{"type":393,"tag":439,"props":7435,"children":7437},{"className":7436},[],[7438],{"type":398,"value":1356},{"type":398,"value":7440}," - remove rows with any missing values",{"type":393,"tag":435,"props":7442,"children":7443},{},[7444,7450],{"type":393,"tag":439,"props":7445,"children":7447},{"className":7446},[],[7448],{"type":398,"value":7449},".dropna(subset=['col'])",{"type":398,"value":7451}," - remove rows missing specific columns",{"type":393,"tag":435,"props":7453,"children":7454},{},[7455,7461],{"type":393,"tag":439,"props":7456,"children":7458},{"className":7457},[],[7459],{"type":398,"value":7460},".dropna(thresh=n)",{"type":398,"value":7462}," - keep rows with at least n non-missing values",{"type":393,"tag":401,"props":7464,"children":7465},{},[7466],{"type":393,"tag":417,"props":7467,"children":7468},{},[7469],{"type":398,"value":7470},"Filling Strategies:",{"type":393,"tag":431,"props":7472,"children":7473},{},[7474,7484,7494,7505],{"type":393,"tag":435,"props":7475,"children":7476},{},[7477,7482],{"type":393,"tag":439,"props":7478,"children":7480},{"className":7479},[],[7481],{"type":398,"value":1406},{"type":398,"value":7483}," - fill with specific value",{"type":393,"tag":435,"props":7485,"children":7486},{},[7487,7492],{"type":393,"tag":439,"props":7488,"children":7490},{"className":7489},[],[7491],{"type":398,"value":1456},{"type":398,"value":7493}," - fill with average",{"type":393,"tag":435,"props":7495,"children":7496},{},[7497,7503],{"type":393,"tag":439,"props":7498,"children":7500},{"className":7499},[],[7501],{"type":398,"value":7502},".fillna(df['col'].median())",{"type":398,"value":7504}," - fill with median",{"type":393,"tag":435,"props":7506,"children":7507},{},[7508,7514],{"type":393,"tag":439,"props":7509,"children":7511},{"className":7510},[],[7512],{"type":398,"value":7513},".fillna('Unknown')",{"type":398,"value":7515}," - fill text with placeholder",{"type":393,"tag":401,"props":7517,"children":7518},{},[7519],{"type":393,"tag":417,"props":7520,"children":7521},{},[7522],{"type":398,"value":7523},"Best Practices:",{"type":393,"tag":431,"props":7525,"children":7526},{},[7527,7532,7537,7542,7547],{"type":393,"tag":435,"props":7528,"children":7529},{},[7530],{"type":398,"value":7531},"Understand WHY data is missing before deciding how to handle it",{"type":393,"tag":435,"props":7533,"children":7534},{},[7535],{"type":398,"value":7536},"Remove rows only when you have plenty of data left",{"type":393,"tag":435,"props":7538,"children":7539},{},[7540],{"type":398,"value":7541},"Use business logic for filling (e.g., quantity = 1 for orders)",{"type":393,"tag":435,"props":7543,"children":7544},{},[7545],{"type":398,"value":7546},"Fill numeric data with mean/median, text data with placeholders",{"type":393,"tag":435,"props":7548,"children":7549},{},[7550],{"type":398,"value":7551},"Keep critical columns, clean or remove less important ones",{"type":393,"tag":401,"props":7553,"children":7554},{},[7555],{"type":393,"tag":417,"props":7556,"children":7557},{},[7558],{"type":398,"value":7559},"Common Patterns:",{"type":393,"tag":431,"props":7561,"children":7562},{},[7563,7568,7573,7578],{"type":393,"tag":435,"props":7564,"children":7565},{},[7566],{"type":398,"value":7567},"Survey data: Fill with \"No Response\" or median",{"type":393,"tag":435,"props":7569,"children":7570},{},[7571],{"type":398,"value":7572},"Sales data: Fill missing quantities with 1, missing amounts with 0",{"type":393,"tag":435,"props":7574,"children":7575},{},[7576],{"type":398,"value":7577},"Time series: Forward fill or interpolate",{"type":393,"tag":435,"props":7579,"children":7580},{},[7581],{"type":398,"value":7582},"Categories: Fill with \"Other\" or most common value",{"type":393,"tag":401,"props":7584,"children":7585},{},[7586,7590],{"type":393,"tag":417,"props":7587,"children":7588},{},[7589],{"type":398,"value":1582},{"type":398,"value":7591}," The goal is clean, usable data - not perfect data!",{"type":393,"tag":524,"props":7593,"children":7595},{"id":7594},"practice-challenge",[7596],{"type":398,"value":7597},"🎮 Practice Challenge",{"type":393,"tag":401,"props":7599,"children":7600},{},[7601],{"type":398,"value":7602},"Apply missing data techniques to a realistic scenario:",{"type":393,"tag":536,"props":7604,"children":7605},{},[7606],{"type":393,"tag":540,"props":7607,"children":7609},{"className":542,"code":7608,"language":544,"meta":6,"style":6},"import pandas as pd\nimport numpy as np\n\n# Customer feedback dataset\nfeedback = pd.DataFrame({\n    'customer_id': [101, 102, 103, 104, 105, 106],\n    'purchase_date': ['2023-01-15', '2023-02-10', None, '2023-01-25', '2023-03-05', '2023-02-20'],\n    'product_rating': [5, None, 4, 3, None, 4],\n    'service_rating': [4, 5, None, 2, 4, None],\n    'total_spent': [150, 89, 200, None, 75, 120],\n    'would_recommend': [True, None, True, False, True, None]\n})\n\nprint(\"🎮 Customer Feedback Challenge:\")\nprint(feedback)\nprint()\n\nprint(\"Your mission: Clean this data for analysis\")\nprint()\n\n# Solution approach\ncleaned_feedback = feedback.copy()\n\nprint(\"Solution approach:\")\nprint(\"1️⃣ Remove customers without purchase date (invalid records)\")\ncleaned_feedback = cleaned_feedback.dropna(subset=['purchase_date'])\nprint(f\"Rows: {len(feedback)} → {len(cleaned_feedback)}\")\n\nprint(\"2️⃣ Fill missing ratings with average ratings\")\navg_product = cleaned_feedback['product_rating'].mean()\navg_service = cleaned_feedback['service_rating'].mean()\ncleaned_feedback['product_rating'] = cleaned_feedback['product_rating'].fillna(avg_product)\ncleaned_feedback['service_rating'] = cleaned_feedback['service_rating'].fillna(avg_service)\n\nprint(\"3️⃣ Fill missing spend with median\")\nmedian_spend = cleaned_feedback['total_spent'].median()\ncleaned_feedback['total_spent'] = cleaned_feedback['total_spent'].fillna(median_spend)\n\nprint(\"4️⃣ Fill missing recommendations based on ratings\")\n# If average rating >= 4, assume would recommend\nfor idx in cleaned_feedback[cleaned_feedback['would_recommend'].isnull()].index:\n    avg_rating = (cleaned_feedback.loc[idx, 'product_rating'] + \n                  cleaned_feedback.loc[idx, 'service_rating']) / 2\n    cleaned_feedback.loc[idx, 'would_recommend'] = avg_rating >= 4\n\nprint()\nprint(\"Cleaned dataset:\")\nprint(cleaned_feedback)\nprint(\"✅ Ready for customer satisfaction analysis!\")\n",[7610],{"type":393,"tag":439,"props":7611,"children":7612},{"__ignoreMap":6},[7613,7632,7651,7658,7666,7682,7747,7812,7872,7932,7993,8055,8062,8069,8089,8101,8112,8119,8139,8150,8157,8165,8182,8189,8209,8229,8266,8323,8330,8350,8376,8401,8434,8466,8473,8493,8518,8550,8557,8577,8585,8616,8650,8675,8709,8716,8727,8747,8759],{"type":393,"tag":550,"props":7614,"children":7615},{"class":552,"line":11},[7616,7620,7624,7628],{"type":393,"tag":550,"props":7617,"children":7618},{"style":556},[7619],{"type":398,"value":559},{"type":393,"tag":550,"props":7621,"children":7622},{"style":562},[7623],{"type":398,"value":565},{"type":393,"tag":550,"props":7625,"children":7626},{"style":556},[7627],{"type":398,"value":570},{"type":393,"tag":550,"props":7629,"children":7630},{"style":562},[7631],{"type":398,"value":575},{"type":393,"tag":550,"props":7633,"children":7634},{"class":552,"line":27},[7635,7639,7643,7647],{"type":393,"tag":550,"props":7636,"children":7637},{"style":556},[7638],{"type":398,"value":559},{"type":393,"tag":550,"props":7640,"children":7641},{"style":562},[7642],{"type":398,"value":587},{"type":393,"tag":550,"props":7644,"children":7645},{"style":556},[7646],{"type":398,"value":570},{"type":393,"tag":550,"props":7648,"children":7649},{"style":562},[7650],{"type":398,"value":596},{"type":393,"tag":550,"props":7652,"children":7653},{"class":552,"line":36},[7654],{"type":393,"tag":550,"props":7655,"children":7656},{"emptyLinePlaceholder":12},[7657],{"type":398,"value":604},{"type":393,"tag":550,"props":7659,"children":7660},{"class":552,"line":45},[7661],{"type":393,"tag":550,"props":7662,"children":7663},{"style":610},[7664],{"type":398,"value":7665},"# Customer feedback dataset\n",{"type":393,"tag":550,"props":7667,"children":7668},{"class":552,"line":54},[7669,7674,7678],{"type":393,"tag":550,"props":7670,"children":7671},{"style":562},[7672],{"type":398,"value":7673},"feedback ",{"type":393,"tag":550,"props":7675,"children":7676},{"style":556},[7677],{"type":398,"value":626},{"type":393,"tag":550,"props":7679,"children":7680},{"style":562},[7681],{"type":398,"value":631},{"type":393,"tag":550,"props":7683,"children":7684},{"class":552,"line":63},[7685,7689,7693,7698,7702,7707,7711,7716,7720,7725,7729,7734,7738,7743],{"type":393,"tag":550,"props":7686,"children":7687},{"style":637},[7688],{"type":398,"value":640},{"type":393,"tag":550,"props":7690,"children":7691},{"style":562},[7692],{"type":398,"value":645},{"type":393,"tag":550,"props":7694,"children":7695},{"style":648},[7696],{"type":398,"value":7697},"101",{"type":393,"tag":550,"props":7699,"children":7700},{"style":562},[7701],{"type":398,"value":656},{"type":393,"tag":550,"props":7703,"children":7704},{"style":648},[7705],{"type":398,"value":7706},"102",{"type":393,"tag":550,"props":7708,"children":7709},{"style":562},[7710],{"type":398,"value":656},{"type":393,"tag":550,"props":7712,"children":7713},{"style":648},[7714],{"type":398,"value":7715},"103",{"type":393,"tag":550,"props":7717,"children":7718},{"style":562},[7719],{"type":398,"value":656},{"type":393,"tag":550,"props":7721,"children":7722},{"style":648},[7723],{"type":398,"value":7724},"104",{"type":393,"tag":550,"props":7726,"children":7727},{"style":562},[7728],{"type":398,"value":656},{"type":393,"tag":550,"props":7730,"children":7731},{"style":648},[7732],{"type":398,"value":7733},"105",{"type":393,"tag":550,"props":7735,"children":7736},{"style":562},[7737],{"type":398,"value":656},{"type":393,"tag":550,"props":7739,"children":7740},{"style":648},[7741],{"type":398,"value":7742},"106",{"type":393,"tag":550,"props":7744,"children":7745},{"style":562},[7746],{"type":398,"value":693},{"type":393,"tag":550,"props":7748,"children":7749},{"class":552,"line":72},[7750,7755,7759,7764,7768,7773,7777,7781,7785,7790,7794,7799,7803,7808],{"type":393,"tag":550,"props":7751,"children":7752},{"style":637},[7753],{"type":398,"value":7754},"    'purchase_date'",{"type":393,"tag":550,"props":7756,"children":7757},{"style":562},[7758],{"type":398,"value":645},{"type":393,"tag":550,"props":7760,"children":7761},{"style":637},[7762],{"type":398,"value":7763},"'2023-01-15'",{"type":393,"tag":550,"props":7765,"children":7766},{"style":562},[7767],{"type":398,"value":656},{"type":393,"tag":550,"props":7769,"children":7770},{"style":637},[7771],{"type":398,"value":7772},"'2023-02-10'",{"type":393,"tag":550,"props":7774,"children":7775},{"style":562},[7776],{"type":398,"value":656},{"type":393,"tag":550,"props":7778,"children":7779},{"style":648},[7780],{"type":398,"value":455},{"type":393,"tag":550,"props":7782,"children":7783},{"style":562},[7784],{"type":398,"value":656},{"type":393,"tag":550,"props":7786,"children":7787},{"style":637},[7788],{"type":398,"value":7789},"'2023-01-25'",{"type":393,"tag":550,"props":7791,"children":7792},{"style":562},[7793],{"type":398,"value":656},{"type":393,"tag":550,"props":7795,"children":7796},{"style":637},[7797],{"type":398,"value":7798},"'2023-03-05'",{"type":393,"tag":550,"props":7800,"children":7801},{"style":562},[7802],{"type":398,"value":656},{"type":393,"tag":550,"props":7804,"children":7805},{"style":637},[7806],{"type":398,"value":7807},"'2023-02-20'",{"type":393,"tag":550,"props":7809,"children":7810},{"style":562},[7811],{"type":398,"value":693},{"type":393,"tag":550,"props":7813,"children":7814},{"class":552,"line":83},[7815,7820,7824,7828,7832,7836,7840,7844,7848,7852,7856,7860,7864,7868],{"type":393,"tag":550,"props":7816,"children":7817},{"style":637},[7818],{"type":398,"value":7819},"    'product_rating'",{"type":393,"tag":550,"props":7821,"children":7822},{"style":562},[7823],{"type":398,"value":645},{"type":393,"tag":550,"props":7825,"children":7826},{"style":648},[7827],{"type":398,"value":688},{"type":393,"tag":550,"props":7829,"children":7830},{"style":562},[7831],{"type":398,"value":656},{"type":393,"tag":550,"props":7833,"children":7834},{"style":648},[7835],{"type":398,"value":455},{"type":393,"tag":550,"props":7837,"children":7838},{"style":562},[7839],{"type":398,"value":656},{"type":393,"tag":550,"props":7841,"children":7842},{"style":648},[7843],{"type":398,"value":679},{"type":393,"tag":550,"props":7845,"children":7846},{"style":562},[7847],{"type":398,"value":656},{"type":393,"tag":550,"props":7849,"children":7850},{"style":648},[7851],{"type":398,"value":670},{"type":393,"tag":550,"props":7853,"children":7854},{"style":562},[7855],{"type":398,"value":656},{"type":393,"tag":550,"props":7857,"children":7858},{"style":648},[7859],{"type":398,"value":455},{"type":393,"tag":550,"props":7861,"children":7862},{"style":562},[7863],{"type":398,"value":656},{"type":393,"tag":550,"props":7865,"children":7866},{"style":648},[7867],{"type":398,"value":679},{"type":393,"tag":550,"props":7869,"children":7870},{"style":562},[7871],{"type":398,"value":693},{"type":393,"tag":550,"props":7873,"children":7874},{"class":552,"line":92},[7875,7880,7884,7888,7892,7896,7900,7904,7908,7912,7916,7920,7924,7928],{"type":393,"tag":550,"props":7876,"children":7877},{"style":637},[7878],{"type":398,"value":7879},"    'service_rating'",{"type":393,"tag":550,"props":7881,"children":7882},{"style":562},[7883],{"type":398,"value":645},{"type":393,"tag":550,"props":7885,"children":7886},{"style":648},[7887],{"type":398,"value":679},{"type":393,"tag":550,"props":7889,"children":7890},{"style":562},[7891],{"type":398,"value":656},{"type":393,"tag":550,"props":7893,"children":7894},{"style":648},[7895],{"type":398,"value":688},{"type":393,"tag":550,"props":7897,"children":7898},{"style":562},[7899],{"type":398,"value":656},{"type":393,"tag":550,"props":7901,"children":7902},{"style":648},[7903],{"type":398,"value":455},{"type":393,"tag":550,"props":7905,"children":7906},{"style":562},[7907],{"type":398,"value":656},{"type":393,"tag":550,"props":7909,"children":7910},{"style":648},[7911],{"type":398,"value":661},{"type":393,"tag":550,"props":7913,"children":7914},{"style":562},[7915],{"type":398,"value":656},{"type":393,"tag":550,"props":7917,"children":7918},{"style":648},[7919],{"type":398,"value":679},{"type":393,"tag":550,"props":7921,"children":7922},{"style":562},[7923],{"type":398,"value":656},{"type":393,"tag":550,"props":7925,"children":7926},{"style":648},[7927],{"type":398,"value":455},{"type":393,"tag":550,"props":7929,"children":7930},{"style":562},[7931],{"type":398,"value":693},{"type":393,"tag":550,"props":7933,"children":7934},{"class":552,"line":101},[7935,7940,7944,7948,7952,7956,7960,7964,7968,7972,7976,7980,7984,7989],{"type":393,"tag":550,"props":7936,"children":7937},{"style":637},[7938],{"type":398,"value":7939},"    'total_spent'",{"type":393,"tag":550,"props":7941,"children":7942},{"style":562},[7943],{"type":398,"value":645},{"type":393,"tag":550,"props":7945,"children":7946},{"style":648},[7947],{"type":398,"value":1858},{"type":393,"tag":550,"props":7949,"children":7950},{"style":562},[7951],{"type":398,"value":656},{"type":393,"tag":550,"props":7953,"children":7954},{"style":648},[7955],{"type":398,"value":3439},{"type":393,"tag":550,"props":7957,"children":7958},{"style":562},[7959],{"type":398,"value":656},{"type":393,"tag":550,"props":7961,"children":7962},{"style":648},[7963],{"type":398,"value":1876},{"type":393,"tag":550,"props":7965,"children":7966},{"style":562},[7967],{"type":398,"value":656},{"type":393,"tag":550,"props":7969,"children":7970},{"style":648},[7971],{"type":398,"value":455},{"type":393,"tag":550,"props":7973,"children":7974},{"style":562},[7975],{"type":398,"value":656},{"type":393,"tag":550,"props":7977,"children":7978},{"style":648},[7979],{"type":398,"value":1820},{"type":393,"tag":550,"props":7981,"children":7982},{"style":562},[7983],{"type":398,"value":656},{"type":393,"tag":550,"props":7985,"children":7986},{"style":648},[7987],{"type":398,"value":7988},"120",{"type":393,"tag":550,"props":7990,"children":7991},{"style":562},[7992],{"type":398,"value":693},{"type":393,"tag":550,"props":7994,"children":7995},{"class":552,"line":110},[7996,8001,8005,8010,8014,8018,8022,8026,8030,8035,8039,8043,8047,8051],{"type":393,"tag":550,"props":7997,"children":7998},{"style":637},[7999],{"type":398,"value":8000},"    'would_recommend'",{"type":393,"tag":550,"props":8002,"children":8003},{"style":562},[8004],{"type":398,"value":645},{"type":393,"tag":550,"props":8006,"children":8007},{"style":648},[8008],{"type":398,"value":8009},"True",{"type":393,"tag":550,"props":8011,"children":8012},{"style":562},[8013],{"type":398,"value":656},{"type":393,"tag":550,"props":8015,"children":8016},{"style":648},[8017],{"type":398,"value":455},{"type":393,"tag":550,"props":8019,"children":8020},{"style":562},[8021],{"type":398,"value":656},{"type":393,"tag":550,"props":8023,"children":8024},{"style":648},[8025],{"type":398,"value":8009},{"type":393,"tag":550,"props":8027,"children":8028},{"style":562},[8029],{"type":398,"value":656},{"type":393,"tag":550,"props":8031,"children":8032},{"style":648},[8033],{"type":398,"value":8034},"False",{"type":393,"tag":550,"props":8036,"children":8037},{"style":562},[8038],{"type":398,"value":656},{"type":393,"tag":550,"props":8040,"children":8041},{"style":648},[8042],{"type":398,"value":8009},{"type":393,"tag":550,"props":8044,"children":8045},{"style":562},[8046],{"type":398,"value":656},{"type":393,"tag":550,"props":8048,"children":8049},{"style":648},[8050],{"type":398,"value":455},{"type":393,"tag":550,"props":8052,"children":8053},{"style":562},[8054],{"type":398,"value":914},{"type":393,"tag":550,"props":8056,"children":8057},{"class":552,"line":121},[8058],{"type":393,"tag":550,"props":8059,"children":8060},{"style":562},[8061],{"type":398,"value":922},{"type":393,"tag":550,"props":8063,"children":8064},{"class":552,"line":130},[8065],{"type":393,"tag":550,"props":8066,"children":8067},{"emptyLinePlaceholder":12},[8068],{"type":398,"value":604},{"type":393,"tag":550,"props":8070,"children":8071},{"class":552,"line":139},[8072,8076,8080,8085],{"type":393,"tag":550,"props":8073,"children":8074},{"style":648},[8075],{"type":398,"value":937},{"type":393,"tag":550,"props":8077,"children":8078},{"style":562},[8079],{"type":398,"value":942},{"type":393,"tag":550,"props":8081,"children":8082},{"style":637},[8083],{"type":398,"value":8084},"\"🎮 Customer Feedback Challenge:\"",{"type":393,"tag":550,"props":8086,"children":8087},{"style":562},[8088],{"type":398,"value":952},{"type":393,"tag":550,"props":8090,"children":8091},{"class":552,"line":148},[8092,8096],{"type":393,"tag":550,"props":8093,"children":8094},{"style":648},[8095],{"type":398,"value":937},{"type":393,"tag":550,"props":8097,"children":8098},{"style":562},[8099],{"type":398,"value":8100},"(feedback)\n",{"type":393,"tag":550,"props":8102,"children":8103},{"class":552,"line":159},[8104,8108],{"type":393,"tag":550,"props":8105,"children":8106},{"style":648},[8107],{"type":398,"value":937},{"type":393,"tag":550,"props":8109,"children":8110},{"style":562},[8111],{"type":398,"value":976},{"type":393,"tag":550,"props":8113,"children":8114},{"class":552,"line":168},[8115],{"type":393,"tag":550,"props":8116,"children":8117},{"emptyLinePlaceholder":12},[8118],{"type":398,"value":604},{"type":393,"tag":550,"props":8120,"children":8121},{"class":552,"line":177},[8122,8126,8130,8135],{"type":393,"tag":550,"props":8123,"children":8124},{"style":648},[8125],{"type":398,"value":937},{"type":393,"tag":550,"props":8127,"children":8128},{"style":562},[8129],{"type":398,"value":942},{"type":393,"tag":550,"props":8131,"children":8132},{"style":637},[8133],{"type":398,"value":8134},"\"Your mission: Clean this data for analysis\"",{"type":393,"tag":550,"props":8136,"children":8137},{"style":562},[8138],{"type":398,"value":952},{"type":393,"tag":550,"props":8140,"children":8141},{"class":552,"line":186},[8142,8146],{"type":393,"tag":550,"props":8143,"children":8144},{"style":648},[8145],{"type":398,"value":937},{"type":393,"tag":550,"props":8147,"children":8148},{"style":562},[8149],{"type":398,"value":976},{"type":393,"tag":550,"props":8151,"children":8152},{"class":552,"line":197},[8153],{"type":393,"tag":550,"props":8154,"children":8155},{"emptyLinePlaceholder":12},[8156],{"type":398,"value":604},{"type":393,"tag":550,"props":8158,"children":8159},{"class":552,"line":206},[8160],{"type":393,"tag":550,"props":8161,"children":8162},{"style":610},[8163],{"type":398,"value":8164},"# Solution approach\n",{"type":393,"tag":550,"props":8166,"children":8167},{"class":552,"line":215},[8168,8173,8177],{"type":393,"tag":550,"props":8169,"children":8170},{"style":562},[8171],{"type":398,"value":8172},"cleaned_feedback ",{"type":393,"tag":550,"props":8174,"children":8175},{"style":556},[8176],{"type":398,"value":626},{"type":393,"tag":550,"props":8178,"children":8179},{"style":562},[8180],{"type":398,"value":8181}," feedback.copy()\n",{"type":393,"tag":550,"props":8183,"children":8184},{"class":552,"line":224},[8185],{"type":393,"tag":550,"props":8186,"children":8187},{"emptyLinePlaceholder":12},[8188],{"type":398,"value":604},{"type":393,"tag":550,"props":8190,"children":8191},{"class":552,"line":233},[8192,8196,8200,8205],{"type":393,"tag":550,"props":8193,"children":8194},{"style":648},[8195],{"type":398,"value":937},{"type":393,"tag":550,"props":8197,"children":8198},{"style":562},[8199],{"type":398,"value":942},{"type":393,"tag":550,"props":8201,"children":8202},{"style":637},[8203],{"type":398,"value":8204},"\"Solution approach:\"",{"type":393,"tag":550,"props":8206,"children":8207},{"style":562},[8208],{"type":398,"value":952},{"type":393,"tag":550,"props":8210,"children":8211},{"class":552,"line":244},[8212,8216,8220,8225],{"type":393,"tag":550,"props":8213,"children":8214},{"style":648},[8215],{"type":398,"value":937},{"type":393,"tag":550,"props":8217,"children":8218},{"style":562},[8219],{"type":398,"value":942},{"type":393,"tag":550,"props":8221,"children":8222},{"style":637},[8223],{"type":398,"value":8224},"\"1️⃣ Remove customers without purchase date (invalid records)\"",{"type":393,"tag":550,"props":8226,"children":8227},{"style":562},[8228],{"type":398,"value":952},{"type":393,"tag":550,"props":8230,"children":8231},{"class":552,"line":253},[8232,8236,8240,8245,8249,8253,8257,8262],{"type":393,"tag":550,"props":8233,"children":8234},{"style":562},[8235],{"type":398,"value":8172},{"type":393,"tag":550,"props":8237,"children":8238},{"style":556},[8239],{"type":398,"value":626},{"type":393,"tag":550,"props":8241,"children":8242},{"style":562},[8243],{"type":398,"value":8244}," cleaned_feedback.dropna(",{"type":393,"tag":550,"props":8246,"children":8247},{"style":2167},[8248],{"type":398,"value":2170},{"type":393,"tag":550,"props":8250,"children":8251},{"style":556},[8252],{"type":398,"value":626},{"type":393,"tag":550,"props":8254,"children":8255},{"style":562},[8256],{"type":398,"value":2179},{"type":393,"tag":550,"props":8258,"children":8259},{"style":637},[8260],{"type":398,"value":8261},"'purchase_date'",{"type":393,"tag":550,"props":8263,"children":8264},{"style":562},[8265],{"type":398,"value":2189},{"type":393,"tag":550,"props":8267,"children":8268},{"class":552,"line":262},[8269,8273,8277,8281,8285,8289,8294,8298,8302,8306,8311,8315,8319],{"type":393,"tag":550,"props":8270,"children":8271},{"style":648},[8272],{"type":398,"value":937},{"type":393,"tag":550,"props":8274,"children":8275},{"style":562},[8276],{"type":398,"value":942},{"type":393,"tag":550,"props":8278,"children":8279},{"style":556},[8280],{"type":398,"value":1157},{"type":393,"tag":550,"props":8282,"children":8283},{"style":637},[8284],{"type":398,"value":2069},{"type":393,"tag":550,"props":8286,"children":8287},{"style":648},[8288],{"type":398,"value":2074},{"type":393,"tag":550,"props":8290,"children":8291},{"style":562},[8292],{"type":398,"value":8293},"(feedback)",{"type":393,"tag":550,"props":8295,"children":8296},{"style":648},[8297],{"type":398,"value":1177},{"type":393,"tag":550,"props":8299,"children":8300},{"style":637},[8301],{"type":398,"value":2088},{"type":393,"tag":550,"props":8303,"children":8304},{"style":648},[8305],{"type":398,"value":2074},{"type":393,"tag":550,"props":8307,"children":8308},{"style":562},[8309],{"type":398,"value":8310},"(cleaned_feedback)",{"type":393,"tag":550,"props":8312,"children":8313},{"style":648},[8314],{"type":398,"value":1177},{"type":393,"tag":550,"props":8316,"children":8317},{"style":637},[8318],{"type":398,"value":1182},{"type":393,"tag":550,"props":8320,"children":8321},{"style":562},[8322],{"type":398,"value":952},{"type":393,"tag":550,"props":8324,"children":8325},{"class":552,"line":271},[8326],{"type":393,"tag":550,"props":8327,"children":8328},{"emptyLinePlaceholder":12},[8329],{"type":398,"value":604},{"type":393,"tag":550,"props":8331,"children":8332},{"class":552,"line":281},[8333,8337,8341,8346],{"type":393,"tag":550,"props":8334,"children":8335},{"style":648},[8336],{"type":398,"value":937},{"type":393,"tag":550,"props":8338,"children":8339},{"style":562},[8340],{"type":398,"value":942},{"type":393,"tag":550,"props":8342,"children":8343},{"style":637},[8344],{"type":398,"value":8345},"\"2️⃣ Fill missing ratings with average ratings\"",{"type":393,"tag":550,"props":8347,"children":8348},{"style":562},[8349],{"type":398,"value":952},{"type":393,"tag":550,"props":8351,"children":8352},{"class":552,"line":290},[8353,8358,8362,8367,8372],{"type":393,"tag":550,"props":8354,"children":8355},{"style":562},[8356],{"type":398,"value":8357},"avg_product ",{"type":393,"tag":550,"props":8359,"children":8360},{"style":556},[8361],{"type":398,"value":626},{"type":393,"tag":550,"props":8363,"children":8364},{"style":562},[8365],{"type":398,"value":8366}," cleaned_feedback[",{"type":393,"tag":550,"props":8368,"children":8369},{"style":637},[8370],{"type":398,"value":8371},"'product_rating'",{"type":393,"tag":550,"props":8373,"children":8374},{"style":562},[8375],{"type":398,"value":2980},{"type":393,"tag":550,"props":8377,"children":8378},{"class":552,"line":299},[8379,8384,8388,8392,8397],{"type":393,"tag":550,"props":8380,"children":8381},{"style":562},[8382],{"type":398,"value":8383},"avg_service ",{"type":393,"tag":550,"props":8385,"children":8386},{"style":556},[8387],{"type":398,"value":626},{"type":393,"tag":550,"props":8389,"children":8390},{"style":562},[8391],{"type":398,"value":8366},{"type":393,"tag":550,"props":8393,"children":8394},{"style":637},[8395],{"type":398,"value":8396},"'service_rating'",{"type":393,"tag":550,"props":8398,"children":8399},{"style":562},[8400],{"type":398,"value":2980},{"type":393,"tag":550,"props":8402,"children":8403},{"class":552,"line":308},[8404,8409,8413,8417,8421,8425,8429],{"type":393,"tag":550,"props":8405,"children":8406},{"style":562},[8407],{"type":398,"value":8408},"cleaned_feedback[",{"type":393,"tag":550,"props":8410,"children":8411},{"style":637},[8412],{"type":398,"value":8371},{"type":393,"tag":550,"props":8414,"children":8415},{"style":562},[8416],{"type":398,"value":2862},{"type":393,"tag":550,"props":8418,"children":8419},{"style":556},[8420],{"type":398,"value":626},{"type":393,"tag":550,"props":8422,"children":8423},{"style":562},[8424],{"type":398,"value":8366},{"type":393,"tag":550,"props":8426,"children":8427},{"style":637},[8428],{"type":398,"value":8371},{"type":393,"tag":550,"props":8430,"children":8431},{"style":562},[8432],{"type":398,"value":8433},"].fillna(avg_product)\n",{"type":393,"tag":550,"props":8435,"children":8436},{"class":552,"line":318},[8437,8441,8445,8449,8453,8457,8461],{"type":393,"tag":550,"props":8438,"children":8439},{"style":562},[8440],{"type":398,"value":8408},{"type":393,"tag":550,"props":8442,"children":8443},{"style":637},[8444],{"type":398,"value":8396},{"type":393,"tag":550,"props":8446,"children":8447},{"style":562},[8448],{"type":398,"value":2862},{"type":393,"tag":550,"props":8450,"children":8451},{"style":556},[8452],{"type":398,"value":626},{"type":393,"tag":550,"props":8454,"children":8455},{"style":562},[8456],{"type":398,"value":8366},{"type":393,"tag":550,"props":8458,"children":8459},{"style":637},[8460],{"type":398,"value":8396},{"type":393,"tag":550,"props":8462,"children":8463},{"style":562},[8464],{"type":398,"value":8465},"].fillna(avg_service)\n",{"type":393,"tag":550,"props":8467,"children":8468},{"class":552,"line":327},[8469],{"type":393,"tag":550,"props":8470,"children":8471},{"emptyLinePlaceholder":12},[8472],{"type":398,"value":604},{"type":393,"tag":550,"props":8474,"children":8475},{"class":552,"line":336},[8476,8480,8484,8489],{"type":393,"tag":550,"props":8477,"children":8478},{"style":648},[8479],{"type":398,"value":937},{"type":393,"tag":550,"props":8481,"children":8482},{"style":562},[8483],{"type":398,"value":942},{"type":393,"tag":550,"props":8485,"children":8486},{"style":637},[8487],{"type":398,"value":8488},"\"3️⃣ Fill missing spend with median\"",{"type":393,"tag":550,"props":8490,"children":8491},{"style":562},[8492],{"type":398,"value":952},{"type":393,"tag":550,"props":8494,"children":8495},{"class":552,"line":346},[8496,8501,8505,8509,8514],{"type":393,"tag":550,"props":8497,"children":8498},{"style":562},[8499],{"type":398,"value":8500},"median_spend ",{"type":393,"tag":550,"props":8502,"children":8503},{"style":556},[8504],{"type":398,"value":626},{"type":393,"tag":550,"props":8506,"children":8507},{"style":562},[8508],{"type":398,"value":8366},{"type":393,"tag":550,"props":8510,"children":8511},{"style":637},[8512],{"type":398,"value":8513},"'total_spent'",{"type":393,"tag":550,"props":8515,"children":8516},{"style":562},[8517],{"type":398,"value":3915},{"type":393,"tag":550,"props":8519,"children":8520},{"class":552,"line":355},[8521,8525,8529,8533,8537,8541,8545],{"type":393,"tag":550,"props":8522,"children":8523},{"style":562},[8524],{"type":398,"value":8408},{"type":393,"tag":550,"props":8526,"children":8527},{"style":637},[8528],{"type":398,"value":8513},{"type":393,"tag":550,"props":8530,"children":8531},{"style":562},[8532],{"type":398,"value":2862},{"type":393,"tag":550,"props":8534,"children":8535},{"style":556},[8536],{"type":398,"value":626},{"type":393,"tag":550,"props":8538,"children":8539},{"style":562},[8540],{"type":398,"value":8366},{"type":393,"tag":550,"props":8542,"children":8543},{"style":637},[8544],{"type":398,"value":8513},{"type":393,"tag":550,"props":8546,"children":8547},{"style":562},[8548],{"type":398,"value":8549},"].fillna(median_spend)\n",{"type":393,"tag":550,"props":8551,"children":8552},{"class":552,"line":364},[8553],{"type":393,"tag":550,"props":8554,"children":8555},{"emptyLinePlaceholder":12},[8556],{"type":398,"value":604},{"type":393,"tag":550,"props":8558,"children":8559},{"class":552,"line":374},[8560,8564,8568,8573],{"type":393,"tag":550,"props":8561,"children":8562},{"style":648},[8563],{"type":398,"value":937},{"type":393,"tag":550,"props":8565,"children":8566},{"style":562},[8567],{"type":398,"value":942},{"type":393,"tag":550,"props":8569,"children":8570},{"style":637},[8571],{"type":398,"value":8572},"\"4️⃣ Fill missing recommendations based on ratings\"",{"type":393,"tag":550,"props":8574,"children":8575},{"style":562},[8576],{"type":398,"value":952},{"type":393,"tag":550,"props":8578,"children":8579},{"class":552,"line":383},[8580],{"type":393,"tag":550,"props":8581,"children":8582},{"style":610},[8583],{"type":398,"value":8584},"# If average rating >= 4, assume would recommend\n",{"type":393,"tag":550,"props":8586,"children":8587},{"class":552,"line":4153},[8588,8592,8597,8601,8606,8611],{"type":393,"tag":550,"props":8589,"children":8590},{"style":556},[8591],{"type":398,"value":7093},{"type":393,"tag":550,"props":8593,"children":8594},{"style":562},[8595],{"type":398,"value":8596}," idx ",{"type":393,"tag":550,"props":8598,"children":8599},{"style":556},[8600],{"type":398,"value":7103},{"type":393,"tag":550,"props":8602,"children":8603},{"style":562},[8604],{"type":398,"value":8605}," cleaned_feedback[cleaned_feedback[",{"type":393,"tag":550,"props":8607,"children":8608},{"style":637},[8609],{"type":398,"value":8610},"'would_recommend'",{"type":393,"tag":550,"props":8612,"children":8613},{"style":562},[8614],{"type":398,"value":8615},"].isnull()].index:\n",{"type":393,"tag":550,"props":8617,"children":8618},{"class":552,"line":4171},[8619,8624,8628,8633,8637,8641,8646],{"type":393,"tag":550,"props":8620,"children":8621},{"style":562},[8622],{"type":398,"value":8623},"    avg_rating ",{"type":393,"tag":550,"props":8625,"children":8626},{"style":556},[8627],{"type":398,"value":626},{"type":393,"tag":550,"props":8629,"children":8630},{"style":562},[8631],{"type":398,"value":8632}," (cleaned_feedback.loc[idx, ",{"type":393,"tag":550,"props":8634,"children":8635},{"style":637},[8636],{"type":398,"value":8371},{"type":393,"tag":550,"props":8638,"children":8639},{"style":562},[8640],{"type":398,"value":2862},{"type":393,"tag":550,"props":8642,"children":8643},{"style":556},[8644],{"type":398,"value":8645},"+",{"type":393,"tag":550,"props":8647,"children":8648},{"style":562},[8649],{"type":398,"value":4216},{"type":393,"tag":550,"props":8651,"children":8652},{"class":552,"line":4197},[8653,8658,8662,8666,8670],{"type":393,"tag":550,"props":8654,"children":8655},{"style":562},[8656],{"type":398,"value":8657},"                  cleaned_feedback.loc[idx, ",{"type":393,"tag":550,"props":8659,"children":8660},{"style":637},[8661],{"type":398,"value":8396},{"type":393,"tag":550,"props":8663,"children":8664},{"style":562},[8665],{"type":398,"value":4117},{"type":393,"tag":550,"props":8667,"children":8668},{"style":556},[8669],{"type":398,"value":1246},{"type":393,"tag":550,"props":8671,"children":8672},{"style":648},[8673],{"type":398,"value":8674}," 2\n",{"type":393,"tag":550,"props":8676,"children":8677},{"class":552,"line":4219},[8678,8683,8687,8691,8695,8700,8704],{"type":393,"tag":550,"props":8679,"children":8680},{"style":562},[8681],{"type":398,"value":8682},"    cleaned_feedback.loc[idx, ",{"type":393,"tag":550,"props":8684,"children":8685},{"style":637},[8686],{"type":398,"value":8610},{"type":393,"tag":550,"props":8688,"children":8689},{"style":562},[8690],{"type":398,"value":2862},{"type":393,"tag":550,"props":8692,"children":8693},{"style":556},[8694],{"type":398,"value":626},{"type":393,"tag":550,"props":8696,"children":8697},{"style":562},[8698],{"type":398,"value":8699}," avg_rating ",{"type":393,"tag":550,"props":8701,"children":8702},{"style":556},[8703],{"type":398,"value":4140},{"type":393,"tag":550,"props":8705,"children":8706},{"style":648},[8707],{"type":398,"value":8708}," 4\n",{"type":393,"tag":550,"props":8710,"children":8711},{"class":552,"line":4232},[8712],{"type":393,"tag":550,"props":8713,"children":8714},{"emptyLinePlaceholder":12},[8715],{"type":398,"value":604},{"type":393,"tag":550,"props":8717,"children":8718},{"class":552,"line":4249},[8719,8723],{"type":393,"tag":550,"props":8720,"children":8721},{"style":648},[8722],{"type":398,"value":937},{"type":393,"tag":550,"props":8724,"children":8725},{"style":562},[8726],{"type":398,"value":976},{"type":393,"tag":550,"props":8728,"children":8729},{"class":552,"line":4284},[8730,8734,8738,8743],{"type":393,"tag":550,"props":8731,"children":8732},{"style":648},[8733],{"type":398,"value":937},{"type":393,"tag":550,"props":8735,"children":8736},{"style":562},[8737],{"type":398,"value":942},{"type":393,"tag":550,"props":8739,"children":8740},{"style":637},[8741],{"type":398,"value":8742},"\"Cleaned dataset:\"",{"type":393,"tag":550,"props":8744,"children":8745},{"style":562},[8746],{"type":398,"value":952},{"type":393,"tag":550,"props":8748,"children":8749},{"class":552,"line":4305},[8750,8754],{"type":393,"tag":550,"props":8751,"children":8752},{"style":648},[8753],{"type":398,"value":937},{"type":393,"tag":550,"props":8755,"children":8756},{"style":562},[8757],{"type":398,"value":8758},"(cleaned_feedback)\n",{"type":393,"tag":550,"props":8760,"children":8761},{"class":552,"line":7336},[8762,8766,8770,8775],{"type":393,"tag":550,"props":8763,"children":8764},{"style":648},[8765],{"type":398,"value":937},{"type":393,"tag":550,"props":8767,"children":8768},{"style":562},[8769],{"type":398,"value":942},{"type":393,"tag":550,"props":8771,"children":8772},{"style":637},[8773],{"type":398,"value":8774},"\"✅ Ready for customer satisfaction analysis!\"",{"type":393,"tag":550,"props":8776,"children":8777},{"style":562},[8778],{"type":398,"value":952},{"type":393,"tag":524,"props":8780,"children":8782},{"id":8781},"whats-next",[8783],{"type":398,"value":8784},"🚀 What's Next?",{"type":393,"tag":401,"props":8786,"children":8787},{},[8788],{"type":398,"value":8789},"Excellent! You now know how to handle missing data effectively. Next, let's tackle another common data quality issue: duplicate records.",{"type":393,"tag":401,"props":8791,"children":8792},{},[8793,8798,8800],{"type":393,"tag":417,"props":8794,"children":8795},{},[8796],{"type":398,"value":8797},"Continue to",{"type":398,"value":8799},": ",{"type":393,"tag":8801,"props":8802,"children":8803},"a",{"href":202},[8804],{"type":398,"value":203},{"type":393,"tag":401,"props":8806,"children":8807},{},[8808],{"type":398,"value":8809},"You're building strong data cleaning skills! 🔍✨",{"type":393,"tag":8811,"props":8812,"children":8813},"style",{},[8814],{"type":398,"value":8815},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .app-dark-mode .shiki span {color: var(--shiki-app-dark-mode);background: var(--shiki-app-dark-mode-bg);font-style: var(--shiki-app-dark-mode-font-style);font-weight: var(--shiki-app-dark-mode-font-weight);text-decoration: var(--shiki-app-dark-mode-text-decoration);}html.app-dark-mode .shiki span {color: var(--shiki-app-dark-mode);background: var(--shiki-app-dark-mode-bg);font-style: var(--shiki-app-dark-mode-font-style);font-weight: var(--shiki-app-dark-mode-font-weight);text-decoration: var(--shiki-app-dark-mode-text-decoration);}",{"title":6,"searchDepth":36,"depth":36,"links":8817},[8818,8819,8820,8821,8822,8823,8824,8825,8826,8827,8828],{"id":526,"depth":27,"text":529},{"id":1290,"depth":27,"text":1293},{"id":1587,"depth":27,"text":1590},{"id":2399,"depth":27,"text":2402},{"id":3202,"depth":27,"text":3205},{"id":4341,"depth":27,"text":4344},{"id":5312,"depth":27,"text":5315},{"id":6177,"depth":27,"text":6180},{"id":7369,"depth":27,"text":7372},{"id":7594,"depth":27,"text":7597},{"id":8781,"depth":27,"text":8784},1782373723187]