[{"data":1,"prerenderedAt":5303},["ShallowReactive",2],{"tutorials-pandas":3,"category-items-pandas":387,"content-/pandas/concatenating-dataframes":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,"expanded":12},"/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,"expanded":12},"/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,"expanded":12},"/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",[313],{"_path":314,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":315,"description":316,"slug":317,"parentId":304,"order":318,"body":389,"_type":14,"_id":319,"_source":16,"_file":320,"_stem":321,"_extension":19},{"type":390,"children":391,"toc":5287},"root",[392,400,406,411,864,871,876,1003,1009,1014,1459,1466,1907,1913,1918,1986,2417,2423,2428,2940,2946,2952,3417,3423,3509,4058,4064,4069,4906,4912,5082,5088,5250,5256,5261,5276,5281],{"type":393,"tag":394,"props":395,"children":396},"element","h1",{"id":317},[397],{"type":398,"value":399},"text","📚 Concatenating DataFrames",{"type":393,"tag":401,"props":402,"children":403},"p",{},[404],{"type":398,"value":405},"Concatenation is the simpler way to combine DataFrames! It's like stacking papers on top of each other or placing them side by side. Use concatenation when your DataFrames have similar structures and you want to combine them into one larger dataset.",{"type":393,"tag":401,"props":407,"children":408},{},[409],{"type":398,"value":410},"Think of concatenation like combining monthly reports into a quarterly report - you're stacking similar data together.",{"type":393,"tag":412,"props":413,"children":414},"code-try",{},[415],{"type":393,"tag":416,"props":417,"children":421},"pre",{"className":418,"code":419,"language":420,"meta":6,"style":6},"language-python shiki shiki-themes github-light github-dark","import pandas as pd\n\n# Monthly sales data\njanuary = pd.DataFrame({\n    'product': ['Laptop', 'Mouse', 'Keyboard'],\n    'sales': [10, 25, 15]\n})\n\nfebruary = pd.DataFrame({\n    'product': ['Laptop', 'Mouse', 'Monitor'],\n    'sales': [12, 30, 8]\n})\n\nprint(\"January sales:\")\nprint(january)\nprint()\nprint(\"February sales:\")\nprint(february)\nprint()\n\n# Concatenate vertically (stack on top)\nquarterly = pd.concat([january, february], ignore_index=True)\nprint(\"Combined quarterly sales:\")\nprint(quarterly)\n","python",[422],{"type":393,"tag":423,"props":424,"children":425},"code",{"__ignoreMap":6},[426,453,461,470,488,531,572,580,587,603,639,677,684,691,714,726,738,758,770,781,788,796,832,852],{"type":393,"tag":427,"props":428,"children":430},"span",{"class":429,"line":11},"line",[431,437,443,448],{"type":393,"tag":427,"props":432,"children":434},{"style":433},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[435],{"type":398,"value":436},"import",{"type":393,"tag":427,"props":438,"children":440},{"style":439},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[441],{"type":398,"value":442}," pandas ",{"type":393,"tag":427,"props":444,"children":445},{"style":433},[446],{"type":398,"value":447},"as",{"type":393,"tag":427,"props":449,"children":450},{"style":439},[451],{"type":398,"value":452}," pd\n",{"type":393,"tag":427,"props":454,"children":455},{"class":429,"line":27},[456],{"type":393,"tag":427,"props":457,"children":458},{"emptyLinePlaceholder":12},[459],{"type":398,"value":460},"\n",{"type":393,"tag":427,"props":462,"children":463},{"class":429,"line":36},[464],{"type":393,"tag":427,"props":465,"children":467},{"style":466},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[468],{"type":398,"value":469},"# Monthly sales data\n",{"type":393,"tag":427,"props":471,"children":472},{"class":429,"line":45},[473,478,483],{"type":393,"tag":427,"props":474,"children":475},{"style":439},[476],{"type":398,"value":477},"january ",{"type":393,"tag":427,"props":479,"children":480},{"style":433},[481],{"type":398,"value":482},"=",{"type":393,"tag":427,"props":484,"children":485},{"style":439},[486],{"type":398,"value":487}," pd.DataFrame({\n",{"type":393,"tag":427,"props":489,"children":490},{"class":429,"line":54},[491,497,502,507,512,517,521,526],{"type":393,"tag":427,"props":492,"children":494},{"style":493},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[495],{"type":398,"value":496},"    'product'",{"type":393,"tag":427,"props":498,"children":499},{"style":439},[500],{"type":398,"value":501},": [",{"type":393,"tag":427,"props":503,"children":504},{"style":493},[505],{"type":398,"value":506},"'Laptop'",{"type":393,"tag":427,"props":508,"children":509},{"style":439},[510],{"type":398,"value":511},", ",{"type":393,"tag":427,"props":513,"children":514},{"style":493},[515],{"type":398,"value":516},"'Mouse'",{"type":393,"tag":427,"props":518,"children":519},{"style":439},[520],{"type":398,"value":511},{"type":393,"tag":427,"props":522,"children":523},{"style":493},[524],{"type":398,"value":525},"'Keyboard'",{"type":393,"tag":427,"props":527,"children":528},{"style":439},[529],{"type":398,"value":530},"],\n",{"type":393,"tag":427,"props":532,"children":533},{"class":429,"line":63},[534,539,543,549,553,558,562,567],{"type":393,"tag":427,"props":535,"children":536},{"style":493},[537],{"type":398,"value":538},"    'sales'",{"type":393,"tag":427,"props":540,"children":541},{"style":439},[542],{"type":398,"value":501},{"type":393,"tag":427,"props":544,"children":546},{"style":545},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[547],{"type":398,"value":548},"10",{"type":393,"tag":427,"props":550,"children":551},{"style":439},[552],{"type":398,"value":511},{"type":393,"tag":427,"props":554,"children":555},{"style":545},[556],{"type":398,"value":557},"25",{"type":393,"tag":427,"props":559,"children":560},{"style":439},[561],{"type":398,"value":511},{"type":393,"tag":427,"props":563,"children":564},{"style":545},[565],{"type":398,"value":566},"15",{"type":393,"tag":427,"props":568,"children":569},{"style":439},[570],{"type":398,"value":571},"]\n",{"type":393,"tag":427,"props":573,"children":574},{"class":429,"line":72},[575],{"type":393,"tag":427,"props":576,"children":577},{"style":439},[578],{"type":398,"value":579},"})\n",{"type":393,"tag":427,"props":581,"children":582},{"class":429,"line":83},[583],{"type":393,"tag":427,"props":584,"children":585},{"emptyLinePlaceholder":12},[586],{"type":398,"value":460},{"type":393,"tag":427,"props":588,"children":589},{"class":429,"line":92},[590,595,599],{"type":393,"tag":427,"props":591,"children":592},{"style":439},[593],{"type":398,"value":594},"february ",{"type":393,"tag":427,"props":596,"children":597},{"style":433},[598],{"type":398,"value":482},{"type":393,"tag":427,"props":600,"children":601},{"style":439},[602],{"type":398,"value":487},{"type":393,"tag":427,"props":604,"children":605},{"class":429,"line":101},[606,610,614,618,622,626,630,635],{"type":393,"tag":427,"props":607,"children":608},{"style":493},[609],{"type":398,"value":496},{"type":393,"tag":427,"props":611,"children":612},{"style":439},[613],{"type":398,"value":501},{"type":393,"tag":427,"props":615,"children":616},{"style":493},[617],{"type":398,"value":506},{"type":393,"tag":427,"props":619,"children":620},{"style":439},[621],{"type":398,"value":511},{"type":393,"tag":427,"props":623,"children":624},{"style":493},[625],{"type":398,"value":516},{"type":393,"tag":427,"props":627,"children":628},{"style":439},[629],{"type":398,"value":511},{"type":393,"tag":427,"props":631,"children":632},{"style":493},[633],{"type":398,"value":634},"'Monitor'",{"type":393,"tag":427,"props":636,"children":637},{"style":439},[638],{"type":398,"value":530},{"type":393,"tag":427,"props":640,"children":641},{"class":429,"line":110},[642,646,650,655,659,664,668,673],{"type":393,"tag":427,"props":643,"children":644},{"style":493},[645],{"type":398,"value":538},{"type":393,"tag":427,"props":647,"children":648},{"style":439},[649],{"type":398,"value":501},{"type":393,"tag":427,"props":651,"children":652},{"style":545},[653],{"type":398,"value":654},"12",{"type":393,"tag":427,"props":656,"children":657},{"style":439},[658],{"type":398,"value":511},{"type":393,"tag":427,"props":660,"children":661},{"style":545},[662],{"type":398,"value":663},"30",{"type":393,"tag":427,"props":665,"children":666},{"style":439},[667],{"type":398,"value":511},{"type":393,"tag":427,"props":669,"children":670},{"style":545},[671],{"type":398,"value":672},"8",{"type":393,"tag":427,"props":674,"children":675},{"style":439},[676],{"type":398,"value":571},{"type":393,"tag":427,"props":678,"children":679},{"class":429,"line":121},[680],{"type":393,"tag":427,"props":681,"children":682},{"style":439},[683],{"type":398,"value":579},{"type":393,"tag":427,"props":685,"children":686},{"class":429,"line":130},[687],{"type":393,"tag":427,"props":688,"children":689},{"emptyLinePlaceholder":12},[690],{"type":398,"value":460},{"type":393,"tag":427,"props":692,"children":693},{"class":429,"line":139},[694,699,704,709],{"type":393,"tag":427,"props":695,"children":696},{"style":545},[697],{"type":398,"value":698},"print",{"type":393,"tag":427,"props":700,"children":701},{"style":439},[702],{"type":398,"value":703},"(",{"type":393,"tag":427,"props":705,"children":706},{"style":493},[707],{"type":398,"value":708},"\"January sales:\"",{"type":393,"tag":427,"props":710,"children":711},{"style":439},[712],{"type":398,"value":713},")\n",{"type":393,"tag":427,"props":715,"children":716},{"class":429,"line":148},[717,721],{"type":393,"tag":427,"props":718,"children":719},{"style":545},[720],{"type":398,"value":698},{"type":393,"tag":427,"props":722,"children":723},{"style":439},[724],{"type":398,"value":725},"(january)\n",{"type":393,"tag":427,"props":727,"children":728},{"class":429,"line":159},[729,733],{"type":393,"tag":427,"props":730,"children":731},{"style":545},[732],{"type":398,"value":698},{"type":393,"tag":427,"props":734,"children":735},{"style":439},[736],{"type":398,"value":737},"()\n",{"type":393,"tag":427,"props":739,"children":740},{"class":429,"line":168},[741,745,749,754],{"type":393,"tag":427,"props":742,"children":743},{"style":545},[744],{"type":398,"value":698},{"type":393,"tag":427,"props":746,"children":747},{"style":439},[748],{"type":398,"value":703},{"type":393,"tag":427,"props":750,"children":751},{"style":493},[752],{"type":398,"value":753},"\"February sales:\"",{"type":393,"tag":427,"props":755,"children":756},{"style":439},[757],{"type":398,"value":713},{"type":393,"tag":427,"props":759,"children":760},{"class":429,"line":177},[761,765],{"type":393,"tag":427,"props":762,"children":763},{"style":545},[764],{"type":398,"value":698},{"type":393,"tag":427,"props":766,"children":767},{"style":439},[768],{"type":398,"value":769},"(february)\n",{"type":393,"tag":427,"props":771,"children":772},{"class":429,"line":186},[773,777],{"type":393,"tag":427,"props":774,"children":775},{"style":545},[776],{"type":398,"value":698},{"type":393,"tag":427,"props":778,"children":779},{"style":439},[780],{"type":398,"value":737},{"type":393,"tag":427,"props":782,"children":783},{"class":429,"line":197},[784],{"type":393,"tag":427,"props":785,"children":786},{"emptyLinePlaceholder":12},[787],{"type":398,"value":460},{"type":393,"tag":427,"props":789,"children":790},{"class":429,"line":206},[791],{"type":393,"tag":427,"props":792,"children":793},{"style":466},[794],{"type":398,"value":795},"# Concatenate vertically (stack on top)\n",{"type":393,"tag":427,"props":797,"children":798},{"class":429,"line":215},[799,804,808,813,819,823,828],{"type":393,"tag":427,"props":800,"children":801},{"style":439},[802],{"type":398,"value":803},"quarterly ",{"type":393,"tag":427,"props":805,"children":806},{"style":433},[807],{"type":398,"value":482},{"type":393,"tag":427,"props":809,"children":810},{"style":439},[811],{"type":398,"value":812}," pd.concat([january, february], ",{"type":393,"tag":427,"props":814,"children":816},{"style":815},"--shiki-default:#E36209;--shiki-app-dark-mode:#FFAB70",[817],{"type":398,"value":818},"ignore_index",{"type":393,"tag":427,"props":820,"children":821},{"style":433},[822],{"type":398,"value":482},{"type":393,"tag":427,"props":824,"children":825},{"style":545},[826],{"type":398,"value":827},"True",{"type":393,"tag":427,"props":829,"children":830},{"style":439},[831],{"type":398,"value":713},{"type":393,"tag":427,"props":833,"children":834},{"class":429,"line":224},[835,839,843,848],{"type":393,"tag":427,"props":836,"children":837},{"style":545},[838],{"type":398,"value":698},{"type":393,"tag":427,"props":840,"children":841},{"style":439},[842],{"type":398,"value":703},{"type":393,"tag":427,"props":844,"children":845},{"style":493},[846],{"type":398,"value":847},"\"Combined quarterly sales:\"",{"type":393,"tag":427,"props":849,"children":850},{"style":439},[851],{"type":398,"value":713},{"type":393,"tag":427,"props":853,"children":854},{"class":429,"line":233},[855,859],{"type":393,"tag":427,"props":856,"children":857},{"style":545},[858],{"type":398,"value":698},{"type":393,"tag":427,"props":860,"children":861},{"style":439},[862],{"type":398,"value":863},"(quarterly)\n",{"type":393,"tag":865,"props":866,"children":868},"h2",{"id":867},"understanding-concatenation",[869],{"type":398,"value":870},"🎯 Understanding Concatenation",{"type":393,"tag":401,"props":872,"children":873},{},[874],{"type":398,"value":875},"Concatenation combines DataFrames along an axis (rows or columns):",{"type":393,"tag":877,"props":878,"children":882},"info-box",{"emoji":879,"title":880,"type":881},"📊","Concatenation Basics","info",[883,892,917,925,948,956],{"type":393,"tag":401,"props":884,"children":885},{},[886],{"type":393,"tag":887,"props":888,"children":889},"strong",{},[890],{"type":398,"value":891},"Two Types:",{"type":393,"tag":893,"props":894,"children":895},"ul",{},[896,907],{"type":393,"tag":897,"props":898,"children":899},"li",{},[900,905],{"type":393,"tag":887,"props":901,"children":902},{},[903],{"type":398,"value":904},"Vertical (axis=0)",{"type":398,"value":906},": Stack DataFrames on top of each other",{"type":393,"tag":897,"props":908,"children":909},{},[910,915],{"type":393,"tag":887,"props":911,"children":912},{},[913],{"type":398,"value":914},"Horizontal (axis=1)",{"type":398,"value":916},": Place DataFrames side by side",{"type":393,"tag":401,"props":918,"children":919},{},[920],{"type":393,"tag":887,"props":921,"children":922},{},[923],{"type":398,"value":924},"When to Use:",{"type":393,"tag":893,"props":926,"children":927},{},[928,933,938,943],{"type":393,"tag":897,"props":929,"children":930},{},[931],{"type":398,"value":932},"Similar structure (same columns for vertical)",{"type":393,"tag":897,"props":934,"children":935},{},[936],{"type":398,"value":937},"Same number of rows (for horizontal)",{"type":393,"tag":897,"props":939,"children":940},{},[941],{"type":398,"value":942},"Time series data (monthly → quarterly)",{"type":393,"tag":897,"props":944,"children":945},{},[946],{"type":398,"value":947},"Multiple data sources with same format",{"type":393,"tag":401,"props":949,"children":950},{},[951],{"type":393,"tag":887,"props":952,"children":953},{},[954],{"type":398,"value":955},"Key Parameters:",{"type":393,"tag":893,"props":957,"children":958},{},[959,970,981,992],{"type":393,"tag":897,"props":960,"children":961},{},[962,968],{"type":393,"tag":423,"props":963,"children":965},{"className":964},[],[966],{"type":398,"value":967},"axis=0",{"type":398,"value":969}," (default): Vertical stacking",{"type":393,"tag":897,"props":971,"children":972},{},[973,979],{"type":393,"tag":423,"props":974,"children":976},{"className":975},[],[977],{"type":398,"value":978},"axis=1",{"type":398,"value":980},": Horizontal stacking",{"type":393,"tag":897,"props":982,"children":983},{},[984,990],{"type":393,"tag":423,"props":985,"children":987},{"className":986},[],[988],{"type":398,"value":989},"ignore_index=True",{"type":398,"value":991},": Reset row numbers",{"type":393,"tag":897,"props":993,"children":994},{},[995,1001],{"type":393,"tag":423,"props":996,"children":998},{"className":997},[],[999],{"type":398,"value":1000},"keys",{"type":398,"value":1002},": Add identifiers for source DataFrames",{"type":393,"tag":865,"props":1004,"children":1006},{"id":1005},"vertical-concatenation-stacking-rows",[1007],{"type":398,"value":1008},"📊 Vertical Concatenation (Stacking Rows)",{"type":393,"tag":401,"props":1010,"children":1011},{},[1012],{"type":398,"value":1013},"Most common use case - stacking DataFrames with same columns:",{"type":393,"tag":412,"props":1015,"children":1016},{},[1017],{"type":393,"tag":416,"props":1018,"children":1020},{"className":418,"code":1019,"language":420,"meta":6,"style":6},"import pandas as pd\n\n# Department sales data\nsales_dept = pd.DataFrame({\n    'employee': ['Alice', 'Bob'],\n    'department': ['Sales', 'Sales'],\n    'revenue': [50000, 45000]\n})\n\nit_dept = pd.DataFrame({\n    'employee': ['Charlie', 'Diana'],\n    'department': ['IT', 'IT'],\n    'revenue': [75000, 80000]\n})\n\nprint(\"Sales department:\")\nprint(sales_dept)\nprint()\nprint(\"IT department:\")\nprint(it_dept)\nprint()\n\n# Concatenate departments\nall_employees = pd.concat([sales_dept, it_dept], ignore_index=True)\nprint(\"All employees:\")\nprint(all_employees)\n",[1021],{"type":393,"tag":423,"props":1022,"children":1023},{"__ignoreMap":6},[1024,1043,1050,1058,1074,1104,1133,1163,1170,1177,1193,1222,1250,1279,1286,1293,1313,1325,1336,1356,1368,1379,1386,1394,1427,1447],{"type":393,"tag":427,"props":1025,"children":1026},{"class":429,"line":11},[1027,1031,1035,1039],{"type":393,"tag":427,"props":1028,"children":1029},{"style":433},[1030],{"type":398,"value":436},{"type":393,"tag":427,"props":1032,"children":1033},{"style":439},[1034],{"type":398,"value":442},{"type":393,"tag":427,"props":1036,"children":1037},{"style":433},[1038],{"type":398,"value":447},{"type":393,"tag":427,"props":1040,"children":1041},{"style":439},[1042],{"type":398,"value":452},{"type":393,"tag":427,"props":1044,"children":1045},{"class":429,"line":27},[1046],{"type":393,"tag":427,"props":1047,"children":1048},{"emptyLinePlaceholder":12},[1049],{"type":398,"value":460},{"type":393,"tag":427,"props":1051,"children":1052},{"class":429,"line":36},[1053],{"type":393,"tag":427,"props":1054,"children":1055},{"style":466},[1056],{"type":398,"value":1057},"# Department sales data\n",{"type":393,"tag":427,"props":1059,"children":1060},{"class":429,"line":45},[1061,1066,1070],{"type":393,"tag":427,"props":1062,"children":1063},{"style":439},[1064],{"type":398,"value":1065},"sales_dept ",{"type":393,"tag":427,"props":1067,"children":1068},{"style":433},[1069],{"type":398,"value":482},{"type":393,"tag":427,"props":1071,"children":1072},{"style":439},[1073],{"type":398,"value":487},{"type":393,"tag":427,"props":1075,"children":1076},{"class":429,"line":54},[1077,1082,1086,1091,1095,1100],{"type":393,"tag":427,"props":1078,"children":1079},{"style":493},[1080],{"type":398,"value":1081},"    'employee'",{"type":393,"tag":427,"props":1083,"children":1084},{"style":439},[1085],{"type":398,"value":501},{"type":393,"tag":427,"props":1087,"children":1088},{"style":493},[1089],{"type":398,"value":1090},"'Alice'",{"type":393,"tag":427,"props":1092,"children":1093},{"style":439},[1094],{"type":398,"value":511},{"type":393,"tag":427,"props":1096,"children":1097},{"style":493},[1098],{"type":398,"value":1099},"'Bob'",{"type":393,"tag":427,"props":1101,"children":1102},{"style":439},[1103],{"type":398,"value":530},{"type":393,"tag":427,"props":1105,"children":1106},{"class":429,"line":63},[1107,1112,1116,1121,1125,1129],{"type":393,"tag":427,"props":1108,"children":1109},{"style":493},[1110],{"type":398,"value":1111},"    'department'",{"type":393,"tag":427,"props":1113,"children":1114},{"style":439},[1115],{"type":398,"value":501},{"type":393,"tag":427,"props":1117,"children":1118},{"style":493},[1119],{"type":398,"value":1120},"'Sales'",{"type":393,"tag":427,"props":1122,"children":1123},{"style":439},[1124],{"type":398,"value":511},{"type":393,"tag":427,"props":1126,"children":1127},{"style":493},[1128],{"type":398,"value":1120},{"type":393,"tag":427,"props":1130,"children":1131},{"style":439},[1132],{"type":398,"value":530},{"type":393,"tag":427,"props":1134,"children":1135},{"class":429,"line":72},[1136,1141,1145,1150,1154,1159],{"type":393,"tag":427,"props":1137,"children":1138},{"style":493},[1139],{"type":398,"value":1140},"    'revenue'",{"type":393,"tag":427,"props":1142,"children":1143},{"style":439},[1144],{"type":398,"value":501},{"type":393,"tag":427,"props":1146,"children":1147},{"style":545},[1148],{"type":398,"value":1149},"50000",{"type":393,"tag":427,"props":1151,"children":1152},{"style":439},[1153],{"type":398,"value":511},{"type":393,"tag":427,"props":1155,"children":1156},{"style":545},[1157],{"type":398,"value":1158},"45000",{"type":393,"tag":427,"props":1160,"children":1161},{"style":439},[1162],{"type":398,"value":571},{"type":393,"tag":427,"props":1164,"children":1165},{"class":429,"line":83},[1166],{"type":393,"tag":427,"props":1167,"children":1168},{"style":439},[1169],{"type":398,"value":579},{"type":393,"tag":427,"props":1171,"children":1172},{"class":429,"line":92},[1173],{"type":393,"tag":427,"props":1174,"children":1175},{"emptyLinePlaceholder":12},[1176],{"type":398,"value":460},{"type":393,"tag":427,"props":1178,"children":1179},{"class":429,"line":101},[1180,1185,1189],{"type":393,"tag":427,"props":1181,"children":1182},{"style":439},[1183],{"type":398,"value":1184},"it_dept ",{"type":393,"tag":427,"props":1186,"children":1187},{"style":433},[1188],{"type":398,"value":482},{"type":393,"tag":427,"props":1190,"children":1191},{"style":439},[1192],{"type":398,"value":487},{"type":393,"tag":427,"props":1194,"children":1195},{"class":429,"line":110},[1196,1200,1204,1209,1213,1218],{"type":393,"tag":427,"props":1197,"children":1198},{"style":493},[1199],{"type":398,"value":1081},{"type":393,"tag":427,"props":1201,"children":1202},{"style":439},[1203],{"type":398,"value":501},{"type":393,"tag":427,"props":1205,"children":1206},{"style":493},[1207],{"type":398,"value":1208},"'Charlie'",{"type":393,"tag":427,"props":1210,"children":1211},{"style":439},[1212],{"type":398,"value":511},{"type":393,"tag":427,"props":1214,"children":1215},{"style":493},[1216],{"type":398,"value":1217},"'Diana'",{"type":393,"tag":427,"props":1219,"children":1220},{"style":439},[1221],{"type":398,"value":530},{"type":393,"tag":427,"props":1223,"children":1224},{"class":429,"line":121},[1225,1229,1233,1238,1242,1246],{"type":393,"tag":427,"props":1226,"children":1227},{"style":493},[1228],{"type":398,"value":1111},{"type":393,"tag":427,"props":1230,"children":1231},{"style":439},[1232],{"type":398,"value":501},{"type":393,"tag":427,"props":1234,"children":1235},{"style":493},[1236],{"type":398,"value":1237},"'IT'",{"type":393,"tag":427,"props":1239,"children":1240},{"style":439},[1241],{"type":398,"value":511},{"type":393,"tag":427,"props":1243,"children":1244},{"style":493},[1245],{"type":398,"value":1237},{"type":393,"tag":427,"props":1247,"children":1248},{"style":439},[1249],{"type":398,"value":530},{"type":393,"tag":427,"props":1251,"children":1252},{"class":429,"line":130},[1253,1257,1261,1266,1270,1275],{"type":393,"tag":427,"props":1254,"children":1255},{"style":493},[1256],{"type":398,"value":1140},{"type":393,"tag":427,"props":1258,"children":1259},{"style":439},[1260],{"type":398,"value":501},{"type":393,"tag":427,"props":1262,"children":1263},{"style":545},[1264],{"type":398,"value":1265},"75000",{"type":393,"tag":427,"props":1267,"children":1268},{"style":439},[1269],{"type":398,"value":511},{"type":393,"tag":427,"props":1271,"children":1272},{"style":545},[1273],{"type":398,"value":1274},"80000",{"type":393,"tag":427,"props":1276,"children":1277},{"style":439},[1278],{"type":398,"value":571},{"type":393,"tag":427,"props":1280,"children":1281},{"class":429,"line":139},[1282],{"type":393,"tag":427,"props":1283,"children":1284},{"style":439},[1285],{"type":398,"value":579},{"type":393,"tag":427,"props":1287,"children":1288},{"class":429,"line":148},[1289],{"type":393,"tag":427,"props":1290,"children":1291},{"emptyLinePlaceholder":12},[1292],{"type":398,"value":460},{"type":393,"tag":427,"props":1294,"children":1295},{"class":429,"line":159},[1296,1300,1304,1309],{"type":393,"tag":427,"props":1297,"children":1298},{"style":545},[1299],{"type":398,"value":698},{"type":393,"tag":427,"props":1301,"children":1302},{"style":439},[1303],{"type":398,"value":703},{"type":393,"tag":427,"props":1305,"children":1306},{"style":493},[1307],{"type":398,"value":1308},"\"Sales department:\"",{"type":393,"tag":427,"props":1310,"children":1311},{"style":439},[1312],{"type":398,"value":713},{"type":393,"tag":427,"props":1314,"children":1315},{"class":429,"line":168},[1316,1320],{"type":393,"tag":427,"props":1317,"children":1318},{"style":545},[1319],{"type":398,"value":698},{"type":393,"tag":427,"props":1321,"children":1322},{"style":439},[1323],{"type":398,"value":1324},"(sales_dept)\n",{"type":393,"tag":427,"props":1326,"children":1327},{"class":429,"line":177},[1328,1332],{"type":393,"tag":427,"props":1329,"children":1330},{"style":545},[1331],{"type":398,"value":698},{"type":393,"tag":427,"props":1333,"children":1334},{"style":439},[1335],{"type":398,"value":737},{"type":393,"tag":427,"props":1337,"children":1338},{"class":429,"line":186},[1339,1343,1347,1352],{"type":393,"tag":427,"props":1340,"children":1341},{"style":545},[1342],{"type":398,"value":698},{"type":393,"tag":427,"props":1344,"children":1345},{"style":439},[1346],{"type":398,"value":703},{"type":393,"tag":427,"props":1348,"children":1349},{"style":493},[1350],{"type":398,"value":1351},"\"IT department:\"",{"type":393,"tag":427,"props":1353,"children":1354},{"style":439},[1355],{"type":398,"value":713},{"type":393,"tag":427,"props":1357,"children":1358},{"class":429,"line":197},[1359,1363],{"type":393,"tag":427,"props":1360,"children":1361},{"style":545},[1362],{"type":398,"value":698},{"type":393,"tag":427,"props":1364,"children":1365},{"style":439},[1366],{"type":398,"value":1367},"(it_dept)\n",{"type":393,"tag":427,"props":1369,"children":1370},{"class":429,"line":206},[1371,1375],{"type":393,"tag":427,"props":1372,"children":1373},{"style":545},[1374],{"type":398,"value":698},{"type":393,"tag":427,"props":1376,"children":1377},{"style":439},[1378],{"type":398,"value":737},{"type":393,"tag":427,"props":1380,"children":1381},{"class":429,"line":215},[1382],{"type":393,"tag":427,"props":1383,"children":1384},{"emptyLinePlaceholder":12},[1385],{"type":398,"value":460},{"type":393,"tag":427,"props":1387,"children":1388},{"class":429,"line":224},[1389],{"type":393,"tag":427,"props":1390,"children":1391},{"style":466},[1392],{"type":398,"value":1393},"# Concatenate departments\n",{"type":393,"tag":427,"props":1395,"children":1396},{"class":429,"line":233},[1397,1402,1406,1411,1415,1419,1423],{"type":393,"tag":427,"props":1398,"children":1399},{"style":439},[1400],{"type":398,"value":1401},"all_employees ",{"type":393,"tag":427,"props":1403,"children":1404},{"style":433},[1405],{"type":398,"value":482},{"type":393,"tag":427,"props":1407,"children":1408},{"style":439},[1409],{"type":398,"value":1410}," pd.concat([sales_dept, it_dept], ",{"type":393,"tag":427,"props":1412,"children":1413},{"style":815},[1414],{"type":398,"value":818},{"type":393,"tag":427,"props":1416,"children":1417},{"style":433},[1418],{"type":398,"value":482},{"type":393,"tag":427,"props":1420,"children":1421},{"style":545},[1422],{"type":398,"value":827},{"type":393,"tag":427,"props":1424,"children":1425},{"style":439},[1426],{"type":398,"value":713},{"type":393,"tag":427,"props":1428,"children":1429},{"class":429,"line":244},[1430,1434,1438,1443],{"type":393,"tag":427,"props":1431,"children":1432},{"style":545},[1433],{"type":398,"value":698},{"type":393,"tag":427,"props":1435,"children":1436},{"style":439},[1437],{"type":398,"value":703},{"type":393,"tag":427,"props":1439,"children":1440},{"style":493},[1441],{"type":398,"value":1442},"\"All employees:\"",{"type":393,"tag":427,"props":1444,"children":1445},{"style":439},[1446],{"type":398,"value":713},{"type":393,"tag":427,"props":1448,"children":1449},{"class":429,"line":253},[1450,1454],{"type":393,"tag":427,"props":1451,"children":1452},{"style":545},[1453],{"type":398,"value":698},{"type":393,"tag":427,"props":1455,"children":1456},{"style":439},[1457],{"type":398,"value":1458},"(all_employees)\n",{"type":393,"tag":1460,"props":1461,"children":1463},"h3",{"id":1462},"handling-different-columns",[1464],{"type":398,"value":1465},"Handling Different Columns",{"type":393,"tag":412,"props":1467,"children":1468},{},[1469],{"type":393,"tag":416,"props":1470,"children":1472},{"className":418,"code":1471,"language":420,"meta":6,"style":6},"import pandas as pd\n\n# DataFrames with some different columns\nonline_sales = pd.DataFrame({\n    'product': ['Laptop', 'Mouse'],\n    'sales': [5, 20],\n    'website': ['Amazon', 'eBay']\n})\n\nstore_sales = pd.DataFrame({\n    'product': ['Keyboard', 'Monitor'],\n    'sales': [10, 3],\n    'store_location': ['NYC', 'LA']\n})\n\nprint(\"Online sales:\")\nprint(online_sales)\nprint()\nprint(\"Store sales:\")\nprint(store_sales)\nprint()\n\n# Concatenate with different columns\nall_sales = pd.concat([online_sales, store_sales], ignore_index=True)\nprint(\"All sales (missing values filled with NaN):\")\nprint(all_sales)\n",[1473],{"type":393,"tag":423,"props":1474,"children":1475},{"__ignoreMap":6},[1476,1495,1502,1510,1526,1553,1582,1612,1619,1626,1642,1669,1697,1727,1734,1741,1761,1773,1784,1804,1816,1827,1834,1842,1875,1895],{"type":393,"tag":427,"props":1477,"children":1478},{"class":429,"line":11},[1479,1483,1487,1491],{"type":393,"tag":427,"props":1480,"children":1481},{"style":433},[1482],{"type":398,"value":436},{"type":393,"tag":427,"props":1484,"children":1485},{"style":439},[1486],{"type":398,"value":442},{"type":393,"tag":427,"props":1488,"children":1489},{"style":433},[1490],{"type":398,"value":447},{"type":393,"tag":427,"props":1492,"children":1493},{"style":439},[1494],{"type":398,"value":452},{"type":393,"tag":427,"props":1496,"children":1497},{"class":429,"line":27},[1498],{"type":393,"tag":427,"props":1499,"children":1500},{"emptyLinePlaceholder":12},[1501],{"type":398,"value":460},{"type":393,"tag":427,"props":1503,"children":1504},{"class":429,"line":36},[1505],{"type":393,"tag":427,"props":1506,"children":1507},{"style":466},[1508],{"type":398,"value":1509},"# DataFrames with some different columns\n",{"type":393,"tag":427,"props":1511,"children":1512},{"class":429,"line":45},[1513,1518,1522],{"type":393,"tag":427,"props":1514,"children":1515},{"style":439},[1516],{"type":398,"value":1517},"online_sales ",{"type":393,"tag":427,"props":1519,"children":1520},{"style":433},[1521],{"type":398,"value":482},{"type":393,"tag":427,"props":1523,"children":1524},{"style":439},[1525],{"type":398,"value":487},{"type":393,"tag":427,"props":1527,"children":1528},{"class":429,"line":54},[1529,1533,1537,1541,1545,1549],{"type":393,"tag":427,"props":1530,"children":1531},{"style":493},[1532],{"type":398,"value":496},{"type":393,"tag":427,"props":1534,"children":1535},{"style":439},[1536],{"type":398,"value":501},{"type":393,"tag":427,"props":1538,"children":1539},{"style":493},[1540],{"type":398,"value":506},{"type":393,"tag":427,"props":1542,"children":1543},{"style":439},[1544],{"type":398,"value":511},{"type":393,"tag":427,"props":1546,"children":1547},{"style":493},[1548],{"type":398,"value":516},{"type":393,"tag":427,"props":1550,"children":1551},{"style":439},[1552],{"type":398,"value":530},{"type":393,"tag":427,"props":1554,"children":1555},{"class":429,"line":63},[1556,1560,1564,1569,1573,1578],{"type":393,"tag":427,"props":1557,"children":1558},{"style":493},[1559],{"type":398,"value":538},{"type":393,"tag":427,"props":1561,"children":1562},{"style":439},[1563],{"type":398,"value":501},{"type":393,"tag":427,"props":1565,"children":1566},{"style":545},[1567],{"type":398,"value":1568},"5",{"type":393,"tag":427,"props":1570,"children":1571},{"style":439},[1572],{"type":398,"value":511},{"type":393,"tag":427,"props":1574,"children":1575},{"style":545},[1576],{"type":398,"value":1577},"20",{"type":393,"tag":427,"props":1579,"children":1580},{"style":439},[1581],{"type":398,"value":530},{"type":393,"tag":427,"props":1583,"children":1584},{"class":429,"line":72},[1585,1590,1594,1599,1603,1608],{"type":393,"tag":427,"props":1586,"children":1587},{"style":493},[1588],{"type":398,"value":1589},"    'website'",{"type":393,"tag":427,"props":1591,"children":1592},{"style":439},[1593],{"type":398,"value":501},{"type":393,"tag":427,"props":1595,"children":1596},{"style":493},[1597],{"type":398,"value":1598},"'Amazon'",{"type":393,"tag":427,"props":1600,"children":1601},{"style":439},[1602],{"type":398,"value":511},{"type":393,"tag":427,"props":1604,"children":1605},{"style":493},[1606],{"type":398,"value":1607},"'eBay'",{"type":393,"tag":427,"props":1609,"children":1610},{"style":439},[1611],{"type":398,"value":571},{"type":393,"tag":427,"props":1613,"children":1614},{"class":429,"line":83},[1615],{"type":393,"tag":427,"props":1616,"children":1617},{"style":439},[1618],{"type":398,"value":579},{"type":393,"tag":427,"props":1620,"children":1621},{"class":429,"line":92},[1622],{"type":393,"tag":427,"props":1623,"children":1624},{"emptyLinePlaceholder":12},[1625],{"type":398,"value":460},{"type":393,"tag":427,"props":1627,"children":1628},{"class":429,"line":101},[1629,1634,1638],{"type":393,"tag":427,"props":1630,"children":1631},{"style":439},[1632],{"type":398,"value":1633},"store_sales ",{"type":393,"tag":427,"props":1635,"children":1636},{"style":433},[1637],{"type":398,"value":482},{"type":393,"tag":427,"props":1639,"children":1640},{"style":439},[1641],{"type":398,"value":487},{"type":393,"tag":427,"props":1643,"children":1644},{"class":429,"line":110},[1645,1649,1653,1657,1661,1665],{"type":393,"tag":427,"props":1646,"children":1647},{"style":493},[1648],{"type":398,"value":496},{"type":393,"tag":427,"props":1650,"children":1651},{"style":439},[1652],{"type":398,"value":501},{"type":393,"tag":427,"props":1654,"children":1655},{"style":493},[1656],{"type":398,"value":525},{"type":393,"tag":427,"props":1658,"children":1659},{"style":439},[1660],{"type":398,"value":511},{"type":393,"tag":427,"props":1662,"children":1663},{"style":493},[1664],{"type":398,"value":634},{"type":393,"tag":427,"props":1666,"children":1667},{"style":439},[1668],{"type":398,"value":530},{"type":393,"tag":427,"props":1670,"children":1671},{"class":429,"line":121},[1672,1676,1680,1684,1688,1693],{"type":393,"tag":427,"props":1673,"children":1674},{"style":493},[1675],{"type":398,"value":538},{"type":393,"tag":427,"props":1677,"children":1678},{"style":439},[1679],{"type":398,"value":501},{"type":393,"tag":427,"props":1681,"children":1682},{"style":545},[1683],{"type":398,"value":548},{"type":393,"tag":427,"props":1685,"children":1686},{"style":439},[1687],{"type":398,"value":511},{"type":393,"tag":427,"props":1689,"children":1690},{"style":545},[1691],{"type":398,"value":1692},"3",{"type":393,"tag":427,"props":1694,"children":1695},{"style":439},[1696],{"type":398,"value":530},{"type":393,"tag":427,"props":1698,"children":1699},{"class":429,"line":130},[1700,1705,1709,1714,1718,1723],{"type":393,"tag":427,"props":1701,"children":1702},{"style":493},[1703],{"type":398,"value":1704},"    'store_location'",{"type":393,"tag":427,"props":1706,"children":1707},{"style":439},[1708],{"type":398,"value":501},{"type":393,"tag":427,"props":1710,"children":1711},{"style":493},[1712],{"type":398,"value":1713},"'NYC'",{"type":393,"tag":427,"props":1715,"children":1716},{"style":439},[1717],{"type":398,"value":511},{"type":393,"tag":427,"props":1719,"children":1720},{"style":493},[1721],{"type":398,"value":1722},"'LA'",{"type":393,"tag":427,"props":1724,"children":1725},{"style":439},[1726],{"type":398,"value":571},{"type":393,"tag":427,"props":1728,"children":1729},{"class":429,"line":139},[1730],{"type":393,"tag":427,"props":1731,"children":1732},{"style":439},[1733],{"type":398,"value":579},{"type":393,"tag":427,"props":1735,"children":1736},{"class":429,"line":148},[1737],{"type":393,"tag":427,"props":1738,"children":1739},{"emptyLinePlaceholder":12},[1740],{"type":398,"value":460},{"type":393,"tag":427,"props":1742,"children":1743},{"class":429,"line":159},[1744,1748,1752,1757],{"type":393,"tag":427,"props":1745,"children":1746},{"style":545},[1747],{"type":398,"value":698},{"type":393,"tag":427,"props":1749,"children":1750},{"style":439},[1751],{"type":398,"value":703},{"type":393,"tag":427,"props":1753,"children":1754},{"style":493},[1755],{"type":398,"value":1756},"\"Online sales:\"",{"type":393,"tag":427,"props":1758,"children":1759},{"style":439},[1760],{"type":398,"value":713},{"type":393,"tag":427,"props":1762,"children":1763},{"class":429,"line":168},[1764,1768],{"type":393,"tag":427,"props":1765,"children":1766},{"style":545},[1767],{"type":398,"value":698},{"type":393,"tag":427,"props":1769,"children":1770},{"style":439},[1771],{"type":398,"value":1772},"(online_sales)\n",{"type":393,"tag":427,"props":1774,"children":1775},{"class":429,"line":177},[1776,1780],{"type":393,"tag":427,"props":1777,"children":1778},{"style":545},[1779],{"type":398,"value":698},{"type":393,"tag":427,"props":1781,"children":1782},{"style":439},[1783],{"type":398,"value":737},{"type":393,"tag":427,"props":1785,"children":1786},{"class":429,"line":186},[1787,1791,1795,1800],{"type":393,"tag":427,"props":1788,"children":1789},{"style":545},[1790],{"type":398,"value":698},{"type":393,"tag":427,"props":1792,"children":1793},{"style":439},[1794],{"type":398,"value":703},{"type":393,"tag":427,"props":1796,"children":1797},{"style":493},[1798],{"type":398,"value":1799},"\"Store sales:\"",{"type":393,"tag":427,"props":1801,"children":1802},{"style":439},[1803],{"type":398,"value":713},{"type":393,"tag":427,"props":1805,"children":1806},{"class":429,"line":197},[1807,1811],{"type":393,"tag":427,"props":1808,"children":1809},{"style":545},[1810],{"type":398,"value":698},{"type":393,"tag":427,"props":1812,"children":1813},{"style":439},[1814],{"type":398,"value":1815},"(store_sales)\n",{"type":393,"tag":427,"props":1817,"children":1818},{"class":429,"line":206},[1819,1823],{"type":393,"tag":427,"props":1820,"children":1821},{"style":545},[1822],{"type":398,"value":698},{"type":393,"tag":427,"props":1824,"children":1825},{"style":439},[1826],{"type":398,"value":737},{"type":393,"tag":427,"props":1828,"children":1829},{"class":429,"line":215},[1830],{"type":393,"tag":427,"props":1831,"children":1832},{"emptyLinePlaceholder":12},[1833],{"type":398,"value":460},{"type":393,"tag":427,"props":1835,"children":1836},{"class":429,"line":224},[1837],{"type":393,"tag":427,"props":1838,"children":1839},{"style":466},[1840],{"type":398,"value":1841},"# Concatenate with different columns\n",{"type":393,"tag":427,"props":1843,"children":1844},{"class":429,"line":233},[1845,1850,1854,1859,1863,1867,1871],{"type":393,"tag":427,"props":1846,"children":1847},{"style":439},[1848],{"type":398,"value":1849},"all_sales ",{"type":393,"tag":427,"props":1851,"children":1852},{"style":433},[1853],{"type":398,"value":482},{"type":393,"tag":427,"props":1855,"children":1856},{"style":439},[1857],{"type":398,"value":1858}," pd.concat([online_sales, store_sales], ",{"type":393,"tag":427,"props":1860,"children":1861},{"style":815},[1862],{"type":398,"value":818},{"type":393,"tag":427,"props":1864,"children":1865},{"style":433},[1866],{"type":398,"value":482},{"type":393,"tag":427,"props":1868,"children":1869},{"style":545},[1870],{"type":398,"value":827},{"type":393,"tag":427,"props":1872,"children":1873},{"style":439},[1874],{"type":398,"value":713},{"type":393,"tag":427,"props":1876,"children":1877},{"class":429,"line":244},[1878,1882,1886,1891],{"type":393,"tag":427,"props":1879,"children":1880},{"style":545},[1881],{"type":398,"value":698},{"type":393,"tag":427,"props":1883,"children":1884},{"style":439},[1885],{"type":398,"value":703},{"type":393,"tag":427,"props":1887,"children":1888},{"style":493},[1889],{"type":398,"value":1890},"\"All sales (missing values filled with NaN):\"",{"type":393,"tag":427,"props":1892,"children":1893},{"style":439},[1894],{"type":398,"value":713},{"type":393,"tag":427,"props":1896,"children":1897},{"class":429,"line":253},[1898,1902],{"type":393,"tag":427,"props":1899,"children":1900},{"style":545},[1901],{"type":398,"value":698},{"type":393,"tag":427,"props":1903,"children":1904},{"style":439},[1905],{"type":398,"value":1906},"(all_sales)\n",{"type":393,"tag":865,"props":1908,"children":1910},{"id":1909},"️-horizontal-concatenation-side-by-side",[1911],{"type":398,"value":1912},"↔️ Horizontal Concatenation (Side by Side)",{"type":393,"tag":401,"props":1914,"children":1915},{},[1916],{"type":398,"value":1917},"Combining DataFrames side by side when they have the same number of rows:",{"type":393,"tag":877,"props":1919,"children":1923},{"emoji":1920,"title":1921,"type":1922},"↔️","Horizontal Concatenation Tips","success",[1924,1932,1950,1958,1976],{"type":393,"tag":401,"props":1925,"children":1926},{},[1927],{"type":393,"tag":887,"props":1928,"children":1929},{},[1930],{"type":398,"value":1931},"Requirements:",{"type":393,"tag":893,"props":1933,"children":1934},{},[1935,1940,1945],{"type":393,"tag":897,"props":1936,"children":1937},{},[1938],{"type":398,"value":1939},"Same number of rows",{"type":393,"tag":897,"props":1941,"children":1942},{},[1943],{"type":398,"value":1944},"Different columns (usually)",{"type":393,"tag":897,"props":1946,"children":1947},{},[1948],{"type":398,"value":1949},"Related data that belongs together",{"type":393,"tag":401,"props":1951,"children":1952},{},[1953],{"type":393,"tag":887,"props":1954,"children":1955},{},[1956],{"type":398,"value":1957},"Common Use Cases:",{"type":393,"tag":893,"props":1959,"children":1960},{},[1961,1966,1971],{"type":393,"tag":897,"props":1962,"children":1963},{},[1964],{"type":398,"value":1965},"Adding new columns from another source",{"type":393,"tag":897,"props":1967,"children":1968},{},[1969],{"type":398,"value":1970},"Combining results from different calculations",{"type":393,"tag":897,"props":1972,"children":1973},{},[1974],{"type":398,"value":1975},"Merging feature sets for analysis",{"type":393,"tag":401,"props":1977,"children":1978},{},[1979,1984],{"type":393,"tag":887,"props":1980,"children":1981},{},[1982],{"type":398,"value":1983},"Important:",{"type":398,"value":1985}," Make sure row order matches between DataFrames!",{"type":393,"tag":412,"props":1987,"children":1988},{},[1989],{"type":393,"tag":416,"props":1990,"children":1992},{"className":418,"code":1991,"language":420,"meta":6,"style":6},"import pandas as pd\n\n# Customer basic info\nbasic_info = pd.DataFrame({\n    'customer_id': [1, 2, 3],\n    'name': ['Alice', 'Bob', 'Charlie']\n})\n\n# Customer contact info\ncontact_info = pd.DataFrame({\n    'email': ['alice@email.com', 'bob@email.com', 'charlie@email.com'],\n    'phone': ['555-0101', '555-0102', '555-0103']\n})\n\nprint(\"Basic info:\")\nprint(basic_info)\nprint()\nprint(\"Contact info:\")\nprint(contact_info)\nprint()\n\n# Concatenate horizontally\ncomplete_info = pd.concat([basic_info, contact_info], axis=1)\nprint(\"Complete customer info:\")\nprint(complete_info)\n",[1993],{"type":393,"tag":423,"props":1994,"children":1995},{"__ignoreMap":6},[1996,2015,2022,2030,2046,2084,2120,2127,2134,2142,2158,2197,2236,2243,2250,2270,2282,2293,2313,2325,2336,2343,2351,2385,2405],{"type":393,"tag":427,"props":1997,"children":1998},{"class":429,"line":11},[1999,2003,2007,2011],{"type":393,"tag":427,"props":2000,"children":2001},{"style":433},[2002],{"type":398,"value":436},{"type":393,"tag":427,"props":2004,"children":2005},{"style":439},[2006],{"type":398,"value":442},{"type":393,"tag":427,"props":2008,"children":2009},{"style":433},[2010],{"type":398,"value":447},{"type":393,"tag":427,"props":2012,"children":2013},{"style":439},[2014],{"type":398,"value":452},{"type":393,"tag":427,"props":2016,"children":2017},{"class":429,"line":27},[2018],{"type":393,"tag":427,"props":2019,"children":2020},{"emptyLinePlaceholder":12},[2021],{"type":398,"value":460},{"type":393,"tag":427,"props":2023,"children":2024},{"class":429,"line":36},[2025],{"type":393,"tag":427,"props":2026,"children":2027},{"style":466},[2028],{"type":398,"value":2029},"# Customer basic info\n",{"type":393,"tag":427,"props":2031,"children":2032},{"class":429,"line":45},[2033,2038,2042],{"type":393,"tag":427,"props":2034,"children":2035},{"style":439},[2036],{"type":398,"value":2037},"basic_info ",{"type":393,"tag":427,"props":2039,"children":2040},{"style":433},[2041],{"type":398,"value":482},{"type":393,"tag":427,"props":2043,"children":2044},{"style":439},[2045],{"type":398,"value":487},{"type":393,"tag":427,"props":2047,"children":2048},{"class":429,"line":54},[2049,2054,2058,2063,2067,2072,2076,2080],{"type":393,"tag":427,"props":2050,"children":2051},{"style":493},[2052],{"type":398,"value":2053},"    'customer_id'",{"type":393,"tag":427,"props":2055,"children":2056},{"style":439},[2057],{"type":398,"value":501},{"type":393,"tag":427,"props":2059,"children":2060},{"style":545},[2061],{"type":398,"value":2062},"1",{"type":393,"tag":427,"props":2064,"children":2065},{"style":439},[2066],{"type":398,"value":511},{"type":393,"tag":427,"props":2068,"children":2069},{"style":545},[2070],{"type":398,"value":2071},"2",{"type":393,"tag":427,"props":2073,"children":2074},{"style":439},[2075],{"type":398,"value":511},{"type":393,"tag":427,"props":2077,"children":2078},{"style":545},[2079],{"type":398,"value":1692},{"type":393,"tag":427,"props":2081,"children":2082},{"style":439},[2083],{"type":398,"value":530},{"type":393,"tag":427,"props":2085,"children":2086},{"class":429,"line":63},[2087,2092,2096,2100,2104,2108,2112,2116],{"type":393,"tag":427,"props":2088,"children":2089},{"style":493},[2090],{"type":398,"value":2091},"    'name'",{"type":393,"tag":427,"props":2093,"children":2094},{"style":439},[2095],{"type":398,"value":501},{"type":393,"tag":427,"props":2097,"children":2098},{"style":493},[2099],{"type":398,"value":1090},{"type":393,"tag":427,"props":2101,"children":2102},{"style":439},[2103],{"type":398,"value":511},{"type":393,"tag":427,"props":2105,"children":2106},{"style":493},[2107],{"type":398,"value":1099},{"type":393,"tag":427,"props":2109,"children":2110},{"style":439},[2111],{"type":398,"value":511},{"type":393,"tag":427,"props":2113,"children":2114},{"style":493},[2115],{"type":398,"value":1208},{"type":393,"tag":427,"props":2117,"children":2118},{"style":439},[2119],{"type":398,"value":571},{"type":393,"tag":427,"props":2121,"children":2122},{"class":429,"line":72},[2123],{"type":393,"tag":427,"props":2124,"children":2125},{"style":439},[2126],{"type":398,"value":579},{"type":393,"tag":427,"props":2128,"children":2129},{"class":429,"line":83},[2130],{"type":393,"tag":427,"props":2131,"children":2132},{"emptyLinePlaceholder":12},[2133],{"type":398,"value":460},{"type":393,"tag":427,"props":2135,"children":2136},{"class":429,"line":92},[2137],{"type":393,"tag":427,"props":2138,"children":2139},{"style":466},[2140],{"type":398,"value":2141},"# Customer contact info\n",{"type":393,"tag":427,"props":2143,"children":2144},{"class":429,"line":101},[2145,2150,2154],{"type":393,"tag":427,"props":2146,"children":2147},{"style":439},[2148],{"type":398,"value":2149},"contact_info ",{"type":393,"tag":427,"props":2151,"children":2152},{"style":433},[2153],{"type":398,"value":482},{"type":393,"tag":427,"props":2155,"children":2156},{"style":439},[2157],{"type":398,"value":487},{"type":393,"tag":427,"props":2159,"children":2160},{"class":429,"line":110},[2161,2166,2170,2175,2179,2184,2188,2193],{"type":393,"tag":427,"props":2162,"children":2163},{"style":493},[2164],{"type":398,"value":2165},"    'email'",{"type":393,"tag":427,"props":2167,"children":2168},{"style":439},[2169],{"type":398,"value":501},{"type":393,"tag":427,"props":2171,"children":2172},{"style":493},[2173],{"type":398,"value":2174},"'alice@email.com'",{"type":393,"tag":427,"props":2176,"children":2177},{"style":439},[2178],{"type":398,"value":511},{"type":393,"tag":427,"props":2180,"children":2181},{"style":493},[2182],{"type":398,"value":2183},"'bob@email.com'",{"type":393,"tag":427,"props":2185,"children":2186},{"style":439},[2187],{"type":398,"value":511},{"type":393,"tag":427,"props":2189,"children":2190},{"style":493},[2191],{"type":398,"value":2192},"'charlie@email.com'",{"type":393,"tag":427,"props":2194,"children":2195},{"style":439},[2196],{"type":398,"value":530},{"type":393,"tag":427,"props":2198,"children":2199},{"class":429,"line":121},[2200,2205,2209,2214,2218,2223,2227,2232],{"type":393,"tag":427,"props":2201,"children":2202},{"style":493},[2203],{"type":398,"value":2204},"    'phone'",{"type":393,"tag":427,"props":2206,"children":2207},{"style":439},[2208],{"type":398,"value":501},{"type":393,"tag":427,"props":2210,"children":2211},{"style":493},[2212],{"type":398,"value":2213},"'555-0101'",{"type":393,"tag":427,"props":2215,"children":2216},{"style":439},[2217],{"type":398,"value":511},{"type":393,"tag":427,"props":2219,"children":2220},{"style":493},[2221],{"type":398,"value":2222},"'555-0102'",{"type":393,"tag":427,"props":2224,"children":2225},{"style":439},[2226],{"type":398,"value":511},{"type":393,"tag":427,"props":2228,"children":2229},{"style":493},[2230],{"type":398,"value":2231},"'555-0103'",{"type":393,"tag":427,"props":2233,"children":2234},{"style":439},[2235],{"type":398,"value":571},{"type":393,"tag":427,"props":2237,"children":2238},{"class":429,"line":130},[2239],{"type":393,"tag":427,"props":2240,"children":2241},{"style":439},[2242],{"type":398,"value":579},{"type":393,"tag":427,"props":2244,"children":2245},{"class":429,"line":139},[2246],{"type":393,"tag":427,"props":2247,"children":2248},{"emptyLinePlaceholder":12},[2249],{"type":398,"value":460},{"type":393,"tag":427,"props":2251,"children":2252},{"class":429,"line":148},[2253,2257,2261,2266],{"type":393,"tag":427,"props":2254,"children":2255},{"style":545},[2256],{"type":398,"value":698},{"type":393,"tag":427,"props":2258,"children":2259},{"style":439},[2260],{"type":398,"value":703},{"type":393,"tag":427,"props":2262,"children":2263},{"style":493},[2264],{"type":398,"value":2265},"\"Basic info:\"",{"type":393,"tag":427,"props":2267,"children":2268},{"style":439},[2269],{"type":398,"value":713},{"type":393,"tag":427,"props":2271,"children":2272},{"class":429,"line":159},[2273,2277],{"type":393,"tag":427,"props":2274,"children":2275},{"style":545},[2276],{"type":398,"value":698},{"type":393,"tag":427,"props":2278,"children":2279},{"style":439},[2280],{"type":398,"value":2281},"(basic_info)\n",{"type":393,"tag":427,"props":2283,"children":2284},{"class":429,"line":168},[2285,2289],{"type":393,"tag":427,"props":2286,"children":2287},{"style":545},[2288],{"type":398,"value":698},{"type":393,"tag":427,"props":2290,"children":2291},{"style":439},[2292],{"type":398,"value":737},{"type":393,"tag":427,"props":2294,"children":2295},{"class":429,"line":177},[2296,2300,2304,2309],{"type":393,"tag":427,"props":2297,"children":2298},{"style":545},[2299],{"type":398,"value":698},{"type":393,"tag":427,"props":2301,"children":2302},{"style":439},[2303],{"type":398,"value":703},{"type":393,"tag":427,"props":2305,"children":2306},{"style":493},[2307],{"type":398,"value":2308},"\"Contact info:\"",{"type":393,"tag":427,"props":2310,"children":2311},{"style":439},[2312],{"type":398,"value":713},{"type":393,"tag":427,"props":2314,"children":2315},{"class":429,"line":186},[2316,2320],{"type":393,"tag":427,"props":2317,"children":2318},{"style":545},[2319],{"type":398,"value":698},{"type":393,"tag":427,"props":2321,"children":2322},{"style":439},[2323],{"type":398,"value":2324},"(contact_info)\n",{"type":393,"tag":427,"props":2326,"children":2327},{"class":429,"line":197},[2328,2332],{"type":393,"tag":427,"props":2329,"children":2330},{"style":545},[2331],{"type":398,"value":698},{"type":393,"tag":427,"props":2333,"children":2334},{"style":439},[2335],{"type":398,"value":737},{"type":393,"tag":427,"props":2337,"children":2338},{"class":429,"line":206},[2339],{"type":393,"tag":427,"props":2340,"children":2341},{"emptyLinePlaceholder":12},[2342],{"type":398,"value":460},{"type":393,"tag":427,"props":2344,"children":2345},{"class":429,"line":215},[2346],{"type":393,"tag":427,"props":2347,"children":2348},{"style":466},[2349],{"type":398,"value":2350},"# Concatenate horizontally\n",{"type":393,"tag":427,"props":2352,"children":2353},{"class":429,"line":224},[2354,2359,2363,2368,2373,2377,2381],{"type":393,"tag":427,"props":2355,"children":2356},{"style":439},[2357],{"type":398,"value":2358},"complete_info ",{"type":393,"tag":427,"props":2360,"children":2361},{"style":433},[2362],{"type":398,"value":482},{"type":393,"tag":427,"props":2364,"children":2365},{"style":439},[2366],{"type":398,"value":2367}," pd.concat([basic_info, contact_info], ",{"type":393,"tag":427,"props":2369,"children":2370},{"style":815},[2371],{"type":398,"value":2372},"axis",{"type":393,"tag":427,"props":2374,"children":2375},{"style":433},[2376],{"type":398,"value":482},{"type":393,"tag":427,"props":2378,"children":2379},{"style":545},[2380],{"type":398,"value":2062},{"type":393,"tag":427,"props":2382,"children":2383},{"style":439},[2384],{"type":398,"value":713},{"type":393,"tag":427,"props":2386,"children":2387},{"class":429,"line":233},[2388,2392,2396,2401],{"type":393,"tag":427,"props":2389,"children":2390},{"style":545},[2391],{"type":398,"value":698},{"type":393,"tag":427,"props":2393,"children":2394},{"style":439},[2395],{"type":398,"value":703},{"type":393,"tag":427,"props":2397,"children":2398},{"style":493},[2399],{"type":398,"value":2400},"\"Complete customer info:\"",{"type":393,"tag":427,"props":2402,"children":2403},{"style":439},[2404],{"type":398,"value":713},{"type":393,"tag":427,"props":2406,"children":2407},{"class":429,"line":244},[2408,2412],{"type":393,"tag":427,"props":2409,"children":2410},{"style":545},[2411],{"type":398,"value":698},{"type":393,"tag":427,"props":2413,"children":2414},{"style":439},[2415],{"type":398,"value":2416},"(complete_info)\n",{"type":393,"tag":865,"props":2418,"children":2420},{"id":2419},"️-adding-source-labels",[2421],{"type":398,"value":2422},"🏷️ Adding Source Labels",{"type":393,"tag":401,"props":2424,"children":2425},{},[2426],{"type":398,"value":2427},"You can track which DataFrame each row came from:",{"type":393,"tag":412,"props":2429,"children":2430},{},[2431],{"type":393,"tag":416,"props":2432,"children":2434},{"className":418,"code":2433,"language":420,"meta":6,"style":6},"import pandas as pd\n\n# Regional sales\nnorth_sales = pd.DataFrame({\n    'product': ['Laptop', 'Mouse'],\n    'sales': [100, 150]\n})\n\nsouth_sales = pd.DataFrame({\n    'product': ['Laptop', 'Keyboard'],\n    'sales': [80, 120]\n})\n\nprint(\"North region:\")\nprint(north_sales)\nprint()\nprint(\"South region:\")\nprint(south_sales)\nprint()\n\n# Concatenate with source labels\nregional_sales = pd.concat([north_sales, south_sales], \n                          keys=['North', 'South'], \n                          names=['Region', 'Row'])\nprint(\"Regional sales with labels:\")\nprint(regional_sales)\nprint()\n\n# Reset index to make it a regular DataFrame\nregional_flat = regional_sales.reset_index()\nprint(\"Flattened with region column:\")\nprint(regional_flat)\n",[2435],{"type":393,"tag":423,"props":2436,"children":2437},{"__ignoreMap":6},[2438,2457,2464,2472,2488,2515,2544,2551,2558,2574,2601,2630,2637,2644,2664,2676,2687,2707,2719,2730,2737,2745,2762,2798,2833,2853,2865,2876,2883,2891,2908,2928],{"type":393,"tag":427,"props":2439,"children":2440},{"class":429,"line":11},[2441,2445,2449,2453],{"type":393,"tag":427,"props":2442,"children":2443},{"style":433},[2444],{"type":398,"value":436},{"type":393,"tag":427,"props":2446,"children":2447},{"style":439},[2448],{"type":398,"value":442},{"type":393,"tag":427,"props":2450,"children":2451},{"style":433},[2452],{"type":398,"value":447},{"type":393,"tag":427,"props":2454,"children":2455},{"style":439},[2456],{"type":398,"value":452},{"type":393,"tag":427,"props":2458,"children":2459},{"class":429,"line":27},[2460],{"type":393,"tag":427,"props":2461,"children":2462},{"emptyLinePlaceholder":12},[2463],{"type":398,"value":460},{"type":393,"tag":427,"props":2465,"children":2466},{"class":429,"line":36},[2467],{"type":393,"tag":427,"props":2468,"children":2469},{"style":466},[2470],{"type":398,"value":2471},"# Regional sales\n",{"type":393,"tag":427,"props":2473,"children":2474},{"class":429,"line":45},[2475,2480,2484],{"type":393,"tag":427,"props":2476,"children":2477},{"style":439},[2478],{"type":398,"value":2479},"north_sales ",{"type":393,"tag":427,"props":2481,"children":2482},{"style":433},[2483],{"type":398,"value":482},{"type":393,"tag":427,"props":2485,"children":2486},{"style":439},[2487],{"type":398,"value":487},{"type":393,"tag":427,"props":2489,"children":2490},{"class":429,"line":54},[2491,2495,2499,2503,2507,2511],{"type":393,"tag":427,"props":2492,"children":2493},{"style":493},[2494],{"type":398,"value":496},{"type":393,"tag":427,"props":2496,"children":2497},{"style":439},[2498],{"type":398,"value":501},{"type":393,"tag":427,"props":2500,"children":2501},{"style":493},[2502],{"type":398,"value":506},{"type":393,"tag":427,"props":2504,"children":2505},{"style":439},[2506],{"type":398,"value":511},{"type":393,"tag":427,"props":2508,"children":2509},{"style":493},[2510],{"type":398,"value":516},{"type":393,"tag":427,"props":2512,"children":2513},{"style":439},[2514],{"type":398,"value":530},{"type":393,"tag":427,"props":2516,"children":2517},{"class":429,"line":63},[2518,2522,2526,2531,2535,2540],{"type":393,"tag":427,"props":2519,"children":2520},{"style":493},[2521],{"type":398,"value":538},{"type":393,"tag":427,"props":2523,"children":2524},{"style":439},[2525],{"type":398,"value":501},{"type":393,"tag":427,"props":2527,"children":2528},{"style":545},[2529],{"type":398,"value":2530},"100",{"type":393,"tag":427,"props":2532,"children":2533},{"style":439},[2534],{"type":398,"value":511},{"type":393,"tag":427,"props":2536,"children":2537},{"style":545},[2538],{"type":398,"value":2539},"150",{"type":393,"tag":427,"props":2541,"children":2542},{"style":439},[2543],{"type":398,"value":571},{"type":393,"tag":427,"props":2545,"children":2546},{"class":429,"line":72},[2547],{"type":393,"tag":427,"props":2548,"children":2549},{"style":439},[2550],{"type":398,"value":579},{"type":393,"tag":427,"props":2552,"children":2553},{"class":429,"line":83},[2554],{"type":393,"tag":427,"props":2555,"children":2556},{"emptyLinePlaceholder":12},[2557],{"type":398,"value":460},{"type":393,"tag":427,"props":2559,"children":2560},{"class":429,"line":92},[2561,2566,2570],{"type":393,"tag":427,"props":2562,"children":2563},{"style":439},[2564],{"type":398,"value":2565},"south_sales ",{"type":393,"tag":427,"props":2567,"children":2568},{"style":433},[2569],{"type":398,"value":482},{"type":393,"tag":427,"props":2571,"children":2572},{"style":439},[2573],{"type":398,"value":487},{"type":393,"tag":427,"props":2575,"children":2576},{"class":429,"line":101},[2577,2581,2585,2589,2593,2597],{"type":393,"tag":427,"props":2578,"children":2579},{"style":493},[2580],{"type":398,"value":496},{"type":393,"tag":427,"props":2582,"children":2583},{"style":439},[2584],{"type":398,"value":501},{"type":393,"tag":427,"props":2586,"children":2587},{"style":493},[2588],{"type":398,"value":506},{"type":393,"tag":427,"props":2590,"children":2591},{"style":439},[2592],{"type":398,"value":511},{"type":393,"tag":427,"props":2594,"children":2595},{"style":493},[2596],{"type":398,"value":525},{"type":393,"tag":427,"props":2598,"children":2599},{"style":439},[2600],{"type":398,"value":530},{"type":393,"tag":427,"props":2602,"children":2603},{"class":429,"line":110},[2604,2608,2612,2617,2621,2626],{"type":393,"tag":427,"props":2605,"children":2606},{"style":493},[2607],{"type":398,"value":538},{"type":393,"tag":427,"props":2609,"children":2610},{"style":439},[2611],{"type":398,"value":501},{"type":393,"tag":427,"props":2613,"children":2614},{"style":545},[2615],{"type":398,"value":2616},"80",{"type":393,"tag":427,"props":2618,"children":2619},{"style":439},[2620],{"type":398,"value":511},{"type":393,"tag":427,"props":2622,"children":2623},{"style":545},[2624],{"type":398,"value":2625},"120",{"type":393,"tag":427,"props":2627,"children":2628},{"style":439},[2629],{"type":398,"value":571},{"type":393,"tag":427,"props":2631,"children":2632},{"class":429,"line":121},[2633],{"type":393,"tag":427,"props":2634,"children":2635},{"style":439},[2636],{"type":398,"value":579},{"type":393,"tag":427,"props":2638,"children":2639},{"class":429,"line":130},[2640],{"type":393,"tag":427,"props":2641,"children":2642},{"emptyLinePlaceholder":12},[2643],{"type":398,"value":460},{"type":393,"tag":427,"props":2645,"children":2646},{"class":429,"line":139},[2647,2651,2655,2660],{"type":393,"tag":427,"props":2648,"children":2649},{"style":545},[2650],{"type":398,"value":698},{"type":393,"tag":427,"props":2652,"children":2653},{"style":439},[2654],{"type":398,"value":703},{"type":393,"tag":427,"props":2656,"children":2657},{"style":493},[2658],{"type":398,"value":2659},"\"North region:\"",{"type":393,"tag":427,"props":2661,"children":2662},{"style":439},[2663],{"type":398,"value":713},{"type":393,"tag":427,"props":2665,"children":2666},{"class":429,"line":148},[2667,2671],{"type":393,"tag":427,"props":2668,"children":2669},{"style":545},[2670],{"type":398,"value":698},{"type":393,"tag":427,"props":2672,"children":2673},{"style":439},[2674],{"type":398,"value":2675},"(north_sales)\n",{"type":393,"tag":427,"props":2677,"children":2678},{"class":429,"line":159},[2679,2683],{"type":393,"tag":427,"props":2680,"children":2681},{"style":545},[2682],{"type":398,"value":698},{"type":393,"tag":427,"props":2684,"children":2685},{"style":439},[2686],{"type":398,"value":737},{"type":393,"tag":427,"props":2688,"children":2689},{"class":429,"line":168},[2690,2694,2698,2703],{"type":393,"tag":427,"props":2691,"children":2692},{"style":545},[2693],{"type":398,"value":698},{"type":393,"tag":427,"props":2695,"children":2696},{"style":439},[2697],{"type":398,"value":703},{"type":393,"tag":427,"props":2699,"children":2700},{"style":493},[2701],{"type":398,"value":2702},"\"South region:\"",{"type":393,"tag":427,"props":2704,"children":2705},{"style":439},[2706],{"type":398,"value":713},{"type":393,"tag":427,"props":2708,"children":2709},{"class":429,"line":177},[2710,2714],{"type":393,"tag":427,"props":2711,"children":2712},{"style":545},[2713],{"type":398,"value":698},{"type":393,"tag":427,"props":2715,"children":2716},{"style":439},[2717],{"type":398,"value":2718},"(south_sales)\n",{"type":393,"tag":427,"props":2720,"children":2721},{"class":429,"line":186},[2722,2726],{"type":393,"tag":427,"props":2723,"children":2724},{"style":545},[2725],{"type":398,"value":698},{"type":393,"tag":427,"props":2727,"children":2728},{"style":439},[2729],{"type":398,"value":737},{"type":393,"tag":427,"props":2731,"children":2732},{"class":429,"line":197},[2733],{"type":393,"tag":427,"props":2734,"children":2735},{"emptyLinePlaceholder":12},[2736],{"type":398,"value":460},{"type":393,"tag":427,"props":2738,"children":2739},{"class":429,"line":206},[2740],{"type":393,"tag":427,"props":2741,"children":2742},{"style":466},[2743],{"type":398,"value":2744},"# Concatenate with source labels\n",{"type":393,"tag":427,"props":2746,"children":2747},{"class":429,"line":215},[2748,2753,2757],{"type":393,"tag":427,"props":2749,"children":2750},{"style":439},[2751],{"type":398,"value":2752},"regional_sales ",{"type":393,"tag":427,"props":2754,"children":2755},{"style":433},[2756],{"type":398,"value":482},{"type":393,"tag":427,"props":2758,"children":2759},{"style":439},[2760],{"type":398,"value":2761}," pd.concat([north_sales, south_sales], \n",{"type":393,"tag":427,"props":2763,"children":2764},{"class":429,"line":224},[2765,2770,2774,2779,2784,2788,2793],{"type":393,"tag":427,"props":2766,"children":2767},{"style":815},[2768],{"type":398,"value":2769},"                          keys",{"type":393,"tag":427,"props":2771,"children":2772},{"style":433},[2773],{"type":398,"value":482},{"type":393,"tag":427,"props":2775,"children":2776},{"style":439},[2777],{"type":398,"value":2778},"[",{"type":393,"tag":427,"props":2780,"children":2781},{"style":493},[2782],{"type":398,"value":2783},"'North'",{"type":393,"tag":427,"props":2785,"children":2786},{"style":439},[2787],{"type":398,"value":511},{"type":393,"tag":427,"props":2789,"children":2790},{"style":493},[2791],{"type":398,"value":2792},"'South'",{"type":393,"tag":427,"props":2794,"children":2795},{"style":439},[2796],{"type":398,"value":2797},"], \n",{"type":393,"tag":427,"props":2799,"children":2800},{"class":429,"line":233},[2801,2806,2810,2814,2819,2823,2828],{"type":393,"tag":427,"props":2802,"children":2803},{"style":815},[2804],{"type":398,"value":2805},"                          names",{"type":393,"tag":427,"props":2807,"children":2808},{"style":433},[2809],{"type":398,"value":482},{"type":393,"tag":427,"props":2811,"children":2812},{"style":439},[2813],{"type":398,"value":2778},{"type":393,"tag":427,"props":2815,"children":2816},{"style":493},[2817],{"type":398,"value":2818},"'Region'",{"type":393,"tag":427,"props":2820,"children":2821},{"style":439},[2822],{"type":398,"value":511},{"type":393,"tag":427,"props":2824,"children":2825},{"style":493},[2826],{"type":398,"value":2827},"'Row'",{"type":393,"tag":427,"props":2829,"children":2830},{"style":439},[2831],{"type":398,"value":2832},"])\n",{"type":393,"tag":427,"props":2834,"children":2835},{"class":429,"line":244},[2836,2840,2844,2849],{"type":393,"tag":427,"props":2837,"children":2838},{"style":545},[2839],{"type":398,"value":698},{"type":393,"tag":427,"props":2841,"children":2842},{"style":439},[2843],{"type":398,"value":703},{"type":393,"tag":427,"props":2845,"children":2846},{"style":493},[2847],{"type":398,"value":2848},"\"Regional sales with labels:\"",{"type":393,"tag":427,"props":2850,"children":2851},{"style":439},[2852],{"type":398,"value":713},{"type":393,"tag":427,"props":2854,"children":2855},{"class":429,"line":253},[2856,2860],{"type":393,"tag":427,"props":2857,"children":2858},{"style":545},[2859],{"type":398,"value":698},{"type":393,"tag":427,"props":2861,"children":2862},{"style":439},[2863],{"type":398,"value":2864},"(regional_sales)\n",{"type":393,"tag":427,"props":2866,"children":2867},{"class":429,"line":262},[2868,2872],{"type":393,"tag":427,"props":2869,"children":2870},{"style":545},[2871],{"type":398,"value":698},{"type":393,"tag":427,"props":2873,"children":2874},{"style":439},[2875],{"type":398,"value":737},{"type":393,"tag":427,"props":2877,"children":2878},{"class":429,"line":271},[2879],{"type":393,"tag":427,"props":2880,"children":2881},{"emptyLinePlaceholder":12},[2882],{"type":398,"value":460},{"type":393,"tag":427,"props":2884,"children":2885},{"class":429,"line":281},[2886],{"type":393,"tag":427,"props":2887,"children":2888},{"style":466},[2889],{"type":398,"value":2890},"# Reset index to make it a regular DataFrame\n",{"type":393,"tag":427,"props":2892,"children":2893},{"class":429,"line":290},[2894,2899,2903],{"type":393,"tag":427,"props":2895,"children":2896},{"style":439},[2897],{"type":398,"value":2898},"regional_flat ",{"type":393,"tag":427,"props":2900,"children":2901},{"style":433},[2902],{"type":398,"value":482},{"type":393,"tag":427,"props":2904,"children":2905},{"style":439},[2906],{"type":398,"value":2907}," regional_sales.reset_index()\n",{"type":393,"tag":427,"props":2909,"children":2910},{"class":429,"line":299},[2911,2915,2919,2924],{"type":393,"tag":427,"props":2912,"children":2913},{"style":545},[2914],{"type":398,"value":698},{"type":393,"tag":427,"props":2916,"children":2917},{"style":439},[2918],{"type":398,"value":703},{"type":393,"tag":427,"props":2920,"children":2921},{"style":493},[2922],{"type":398,"value":2923},"\"Flattened with region column:\"",{"type":393,"tag":427,"props":2925,"children":2926},{"style":439},[2927],{"type":398,"value":713},{"type":393,"tag":427,"props":2929,"children":2930},{"class":429,"line":308},[2931,2935],{"type":393,"tag":427,"props":2932,"children":2933},{"style":545},[2934],{"type":398,"value":698},{"type":393,"tag":427,"props":2936,"children":2937},{"style":439},[2938],{"type":398,"value":2939},"(regional_flat)\n",{"type":393,"tag":865,"props":2941,"children":2943},{"id":2942},"advanced-concatenation-options",[2944],{"type":398,"value":2945},"🔧 Advanced Concatenation Options",{"type":393,"tag":1460,"props":2947,"children":2949},{"id":2948},"handling-index-conflicts",[2950],{"type":398,"value":2951},"Handling Index Conflicts",{"type":393,"tag":412,"props":2953,"children":2954},{},[2955],{"type":393,"tag":416,"props":2956,"children":2958},{"className":418,"code":2957,"language":420,"meta":6,"style":6},"import pandas as pd\n\n# DataFrames with overlapping indices\nq1_data = pd.DataFrame({\n    'revenue': [100, 200]\n}, index=[1, 2])\n\nq2_data = pd.DataFrame({\n    'revenue': [150, 180]\n}, index=[2, 3])  # Note: index 2 appears in both\n\nprint(\"Q1 data:\")\nprint(q1_data)\nprint()\nprint(\"Q2 data:\")\nprint(q2_data)\nprint()\n\n# Option 1: Keep original indices (default)\ncombined_keep = pd.concat([q1_data, q2_data])\nprint(\"Keep original indices (note duplicate index 2):\")\nprint(combined_keep)\nprint()\n\n# Option 2: Reset indices\ncombined_reset = pd.concat([q1_data, q2_data], ignore_index=True)\nprint(\"Reset indices:\")\nprint(combined_reset)\n",[2959],{"type":393,"tag":423,"props":2960,"children":2961},{"__ignoreMap":6},[2962,2981,2988,2996,3012,3040,3077,3084,3100,3128,3169,3176,3196,3208,3219,3239,3251,3262,3269,3277,3294,3314,3326,3337,3344,3352,3385,3405],{"type":393,"tag":427,"props":2963,"children":2964},{"class":429,"line":11},[2965,2969,2973,2977],{"type":393,"tag":427,"props":2966,"children":2967},{"style":433},[2968],{"type":398,"value":436},{"type":393,"tag":427,"props":2970,"children":2971},{"style":439},[2972],{"type":398,"value":442},{"type":393,"tag":427,"props":2974,"children":2975},{"style":433},[2976],{"type":398,"value":447},{"type":393,"tag":427,"props":2978,"children":2979},{"style":439},[2980],{"type":398,"value":452},{"type":393,"tag":427,"props":2982,"children":2983},{"class":429,"line":27},[2984],{"type":393,"tag":427,"props":2985,"children":2986},{"emptyLinePlaceholder":12},[2987],{"type":398,"value":460},{"type":393,"tag":427,"props":2989,"children":2990},{"class":429,"line":36},[2991],{"type":393,"tag":427,"props":2992,"children":2993},{"style":466},[2994],{"type":398,"value":2995},"# DataFrames with overlapping indices\n",{"type":393,"tag":427,"props":2997,"children":2998},{"class":429,"line":45},[2999,3004,3008],{"type":393,"tag":427,"props":3000,"children":3001},{"style":439},[3002],{"type":398,"value":3003},"q1_data ",{"type":393,"tag":427,"props":3005,"children":3006},{"style":433},[3007],{"type":398,"value":482},{"type":393,"tag":427,"props":3009,"children":3010},{"style":439},[3011],{"type":398,"value":487},{"type":393,"tag":427,"props":3013,"children":3014},{"class":429,"line":54},[3015,3019,3023,3027,3031,3036],{"type":393,"tag":427,"props":3016,"children":3017},{"style":493},[3018],{"type":398,"value":1140},{"type":393,"tag":427,"props":3020,"children":3021},{"style":439},[3022],{"type":398,"value":501},{"type":393,"tag":427,"props":3024,"children":3025},{"style":545},[3026],{"type":398,"value":2530},{"type":393,"tag":427,"props":3028,"children":3029},{"style":439},[3030],{"type":398,"value":511},{"type":393,"tag":427,"props":3032,"children":3033},{"style":545},[3034],{"type":398,"value":3035},"200",{"type":393,"tag":427,"props":3037,"children":3038},{"style":439},[3039],{"type":398,"value":571},{"type":393,"tag":427,"props":3041,"children":3042},{"class":429,"line":63},[3043,3048,3053,3057,3061,3065,3069,3073],{"type":393,"tag":427,"props":3044,"children":3045},{"style":439},[3046],{"type":398,"value":3047},"}, ",{"type":393,"tag":427,"props":3049,"children":3050},{"style":815},[3051],{"type":398,"value":3052},"index",{"type":393,"tag":427,"props":3054,"children":3055},{"style":433},[3056],{"type":398,"value":482},{"type":393,"tag":427,"props":3058,"children":3059},{"style":439},[3060],{"type":398,"value":2778},{"type":393,"tag":427,"props":3062,"children":3063},{"style":545},[3064],{"type":398,"value":2062},{"type":393,"tag":427,"props":3066,"children":3067},{"style":439},[3068],{"type":398,"value":511},{"type":393,"tag":427,"props":3070,"children":3071},{"style":545},[3072],{"type":398,"value":2071},{"type":393,"tag":427,"props":3074,"children":3075},{"style":439},[3076],{"type":398,"value":2832},{"type":393,"tag":427,"props":3078,"children":3079},{"class":429,"line":72},[3080],{"type":393,"tag":427,"props":3081,"children":3082},{"emptyLinePlaceholder":12},[3083],{"type":398,"value":460},{"type":393,"tag":427,"props":3085,"children":3086},{"class":429,"line":83},[3087,3092,3096],{"type":393,"tag":427,"props":3088,"children":3089},{"style":439},[3090],{"type":398,"value":3091},"q2_data ",{"type":393,"tag":427,"props":3093,"children":3094},{"style":433},[3095],{"type":398,"value":482},{"type":393,"tag":427,"props":3097,"children":3098},{"style":439},[3099],{"type":398,"value":487},{"type":393,"tag":427,"props":3101,"children":3102},{"class":429,"line":92},[3103,3107,3111,3115,3119,3124],{"type":393,"tag":427,"props":3104,"children":3105},{"style":493},[3106],{"type":398,"value":1140},{"type":393,"tag":427,"props":3108,"children":3109},{"style":439},[3110],{"type":398,"value":501},{"type":393,"tag":427,"props":3112,"children":3113},{"style":545},[3114],{"type":398,"value":2539},{"type":393,"tag":427,"props":3116,"children":3117},{"style":439},[3118],{"type":398,"value":511},{"type":393,"tag":427,"props":3120,"children":3121},{"style":545},[3122],{"type":398,"value":3123},"180",{"type":393,"tag":427,"props":3125,"children":3126},{"style":439},[3127],{"type":398,"value":571},{"type":393,"tag":427,"props":3129,"children":3130},{"class":429,"line":101},[3131,3135,3139,3143,3147,3151,3155,3159,3164],{"type":393,"tag":427,"props":3132,"children":3133},{"style":439},[3134],{"type":398,"value":3047},{"type":393,"tag":427,"props":3136,"children":3137},{"style":815},[3138],{"type":398,"value":3052},{"type":393,"tag":427,"props":3140,"children":3141},{"style":433},[3142],{"type":398,"value":482},{"type":393,"tag":427,"props":3144,"children":3145},{"style":439},[3146],{"type":398,"value":2778},{"type":393,"tag":427,"props":3148,"children":3149},{"style":545},[3150],{"type":398,"value":2071},{"type":393,"tag":427,"props":3152,"children":3153},{"style":439},[3154],{"type":398,"value":511},{"type":393,"tag":427,"props":3156,"children":3157},{"style":545},[3158],{"type":398,"value":1692},{"type":393,"tag":427,"props":3160,"children":3161},{"style":439},[3162],{"type":398,"value":3163},"])  ",{"type":393,"tag":427,"props":3165,"children":3166},{"style":466},[3167],{"type":398,"value":3168},"# Note: index 2 appears in both\n",{"type":393,"tag":427,"props":3170,"children":3171},{"class":429,"line":110},[3172],{"type":393,"tag":427,"props":3173,"children":3174},{"emptyLinePlaceholder":12},[3175],{"type":398,"value":460},{"type":393,"tag":427,"props":3177,"children":3178},{"class":429,"line":121},[3179,3183,3187,3192],{"type":393,"tag":427,"props":3180,"children":3181},{"style":545},[3182],{"type":398,"value":698},{"type":393,"tag":427,"props":3184,"children":3185},{"style":439},[3186],{"type":398,"value":703},{"type":393,"tag":427,"props":3188,"children":3189},{"style":493},[3190],{"type":398,"value":3191},"\"Q1 data:\"",{"type":393,"tag":427,"props":3193,"children":3194},{"style":439},[3195],{"type":398,"value":713},{"type":393,"tag":427,"props":3197,"children":3198},{"class":429,"line":130},[3199,3203],{"type":393,"tag":427,"props":3200,"children":3201},{"style":545},[3202],{"type":398,"value":698},{"type":393,"tag":427,"props":3204,"children":3205},{"style":439},[3206],{"type":398,"value":3207},"(q1_data)\n",{"type":393,"tag":427,"props":3209,"children":3210},{"class":429,"line":139},[3211,3215],{"type":393,"tag":427,"props":3212,"children":3213},{"style":545},[3214],{"type":398,"value":698},{"type":393,"tag":427,"props":3216,"children":3217},{"style":439},[3218],{"type":398,"value":737},{"type":393,"tag":427,"props":3220,"children":3221},{"class":429,"line":148},[3222,3226,3230,3235],{"type":393,"tag":427,"props":3223,"children":3224},{"style":545},[3225],{"type":398,"value":698},{"type":393,"tag":427,"props":3227,"children":3228},{"style":439},[3229],{"type":398,"value":703},{"type":393,"tag":427,"props":3231,"children":3232},{"style":493},[3233],{"type":398,"value":3234},"\"Q2 data:\"",{"type":393,"tag":427,"props":3236,"children":3237},{"style":439},[3238],{"type":398,"value":713},{"type":393,"tag":427,"props":3240,"children":3241},{"class":429,"line":159},[3242,3246],{"type":393,"tag":427,"props":3243,"children":3244},{"style":545},[3245],{"type":398,"value":698},{"type":393,"tag":427,"props":3247,"children":3248},{"style":439},[3249],{"type":398,"value":3250},"(q2_data)\n",{"type":393,"tag":427,"props":3252,"children":3253},{"class":429,"line":168},[3254,3258],{"type":393,"tag":427,"props":3255,"children":3256},{"style":545},[3257],{"type":398,"value":698},{"type":393,"tag":427,"props":3259,"children":3260},{"style":439},[3261],{"type":398,"value":737},{"type":393,"tag":427,"props":3263,"children":3264},{"class":429,"line":177},[3265],{"type":393,"tag":427,"props":3266,"children":3267},{"emptyLinePlaceholder":12},[3268],{"type":398,"value":460},{"type":393,"tag":427,"props":3270,"children":3271},{"class":429,"line":186},[3272],{"type":393,"tag":427,"props":3273,"children":3274},{"style":466},[3275],{"type":398,"value":3276},"# Option 1: Keep original indices (default)\n",{"type":393,"tag":427,"props":3278,"children":3279},{"class":429,"line":197},[3280,3285,3289],{"type":393,"tag":427,"props":3281,"children":3282},{"style":439},[3283],{"type":398,"value":3284},"combined_keep ",{"type":393,"tag":427,"props":3286,"children":3287},{"style":433},[3288],{"type":398,"value":482},{"type":393,"tag":427,"props":3290,"children":3291},{"style":439},[3292],{"type":398,"value":3293}," pd.concat([q1_data, q2_data])\n",{"type":393,"tag":427,"props":3295,"children":3296},{"class":429,"line":206},[3297,3301,3305,3310],{"type":393,"tag":427,"props":3298,"children":3299},{"style":545},[3300],{"type":398,"value":698},{"type":393,"tag":427,"props":3302,"children":3303},{"style":439},[3304],{"type":398,"value":703},{"type":393,"tag":427,"props":3306,"children":3307},{"style":493},[3308],{"type":398,"value":3309},"\"Keep original indices (note duplicate index 2):\"",{"type":393,"tag":427,"props":3311,"children":3312},{"style":439},[3313],{"type":398,"value":713},{"type":393,"tag":427,"props":3315,"children":3316},{"class":429,"line":215},[3317,3321],{"type":393,"tag":427,"props":3318,"children":3319},{"style":545},[3320],{"type":398,"value":698},{"type":393,"tag":427,"props":3322,"children":3323},{"style":439},[3324],{"type":398,"value":3325},"(combined_keep)\n",{"type":393,"tag":427,"props":3327,"children":3328},{"class":429,"line":224},[3329,3333],{"type":393,"tag":427,"props":3330,"children":3331},{"style":545},[3332],{"type":398,"value":698},{"type":393,"tag":427,"props":3334,"children":3335},{"style":439},[3336],{"type":398,"value":737},{"type":393,"tag":427,"props":3338,"children":3339},{"class":429,"line":233},[3340],{"type":393,"tag":427,"props":3341,"children":3342},{"emptyLinePlaceholder":12},[3343],{"type":398,"value":460},{"type":393,"tag":427,"props":3345,"children":3346},{"class":429,"line":244},[3347],{"type":393,"tag":427,"props":3348,"children":3349},{"style":466},[3350],{"type":398,"value":3351},"# Option 2: Reset indices\n",{"type":393,"tag":427,"props":3353,"children":3354},{"class":429,"line":253},[3355,3360,3364,3369,3373,3377,3381],{"type":393,"tag":427,"props":3356,"children":3357},{"style":439},[3358],{"type":398,"value":3359},"combined_reset ",{"type":393,"tag":427,"props":3361,"children":3362},{"style":433},[3363],{"type":398,"value":482},{"type":393,"tag":427,"props":3365,"children":3366},{"style":439},[3367],{"type":398,"value":3368}," pd.concat([q1_data, q2_data], ",{"type":393,"tag":427,"props":3370,"children":3371},{"style":815},[3372],{"type":398,"value":818},{"type":393,"tag":427,"props":3374,"children":3375},{"style":433},[3376],{"type":398,"value":482},{"type":393,"tag":427,"props":3378,"children":3379},{"style":545},[3380],{"type":398,"value":827},{"type":393,"tag":427,"props":3382,"children":3383},{"style":439},[3384],{"type":398,"value":713},{"type":393,"tag":427,"props":3386,"children":3387},{"class":429,"line":262},[3388,3392,3396,3401],{"type":393,"tag":427,"props":3389,"children":3390},{"style":545},[3391],{"type":398,"value":698},{"type":393,"tag":427,"props":3393,"children":3394},{"style":439},[3395],{"type":398,"value":703},{"type":393,"tag":427,"props":3397,"children":3398},{"style":493},[3399],{"type":398,"value":3400},"\"Reset indices:\"",{"type":393,"tag":427,"props":3402,"children":3403},{"style":439},[3404],{"type":398,"value":713},{"type":393,"tag":427,"props":3406,"children":3407},{"class":429,"line":271},[3408,3412],{"type":393,"tag":427,"props":3409,"children":3410},{"style":545},[3411],{"type":398,"value":698},{"type":393,"tag":427,"props":3413,"children":3414},{"style":439},[3415],{"type":398,"value":3416},"(combined_reset)\n",{"type":393,"tag":1460,"props":3418,"children":3420},{"id":3419},"join-types-in-concatenation",[3421],{"type":398,"value":3422},"Join Types in Concatenation",{"type":393,"tag":877,"props":3424,"children":3427},{"emoji":3425,"title":3426,"type":881},"🔗","Join Options",[3428,3436,3458,3466,3488,3496],{"type":393,"tag":401,"props":3429,"children":3430},{},[3431],{"type":393,"tag":887,"props":3432,"children":3433},{},[3434],{"type":398,"value":3435},"Inner Join:",{"type":393,"tag":893,"props":3437,"children":3438},{},[3439,3444,3453],{"type":393,"tag":897,"props":3440,"children":3441},{},[3442],{"type":398,"value":3443},"Only keep columns that exist in ALL DataFrames",{"type":393,"tag":897,"props":3445,"children":3446},{},[3447],{"type":393,"tag":423,"props":3448,"children":3450},{"className":3449},[],[3451],{"type":398,"value":3452},"join='inner'",{"type":393,"tag":897,"props":3454,"children":3455},{},[3456],{"type":398,"value":3457},"More restrictive, fewer columns",{"type":393,"tag":401,"props":3459,"children":3460},{},[3461],{"type":393,"tag":887,"props":3462,"children":3463},{},[3464],{"type":398,"value":3465},"Outer Join (default):",{"type":393,"tag":893,"props":3467,"children":3468},{},[3469,3474,3483],{"type":393,"tag":897,"props":3470,"children":3471},{},[3472],{"type":398,"value":3473},"Keep ALL columns from ALL DataFrames",{"type":393,"tag":897,"props":3475,"children":3476},{},[3477],{"type":393,"tag":423,"props":3478,"children":3480},{"className":3479},[],[3481],{"type":398,"value":3482},"join='outer'",{"type":393,"tag":897,"props":3484,"children":3485},{},[3486],{"type":398,"value":3487},"Fill missing values with NaN",{"type":393,"tag":401,"props":3489,"children":3490},{},[3491],{"type":393,"tag":887,"props":3492,"children":3493},{},[3494],{"type":398,"value":3495},"Use Cases:",{"type":393,"tag":893,"props":3497,"children":3498},{},[3499,3504],{"type":393,"tag":897,"props":3500,"children":3501},{},[3502],{"type":398,"value":3503},"Inner: When you need complete data only",{"type":393,"tag":897,"props":3505,"children":3506},{},[3507],{"type":398,"value":3508},"Outer: When you want to preserve all information",{"type":393,"tag":412,"props":3510,"children":3511},{},[3512],{"type":393,"tag":416,"props":3513,"children":3515},{"className":418,"code":3514,"language":420,"meta":6,"style":6},"import pandas as pd\n\n# DataFrames with some overlapping columns\ndf1 = pd.DataFrame({\n    'A': [1, 2],\n    'B': [3, 4],\n    'C': [5, 6]\n})\n\ndf2 = pd.DataFrame({\n    'B': [7, 8],\n    'C': [9, 10],\n    'D': [11, 12]\n})\n\nprint(\"DataFrame 1:\")\nprint(df1)\nprint()\nprint(\"DataFrame 2:\")\nprint(df2)\nprint()\n\n# Outer join (default) - keeps all columns\nouter_join = pd.concat([df1, df2], ignore_index=True)\nprint(\"Outer join (all columns):\")\nprint(outer_join)\nprint()\n\n# Inner join - only common columns\ninner_join = pd.concat([df1, df2], join='inner', ignore_index=True)\nprint(\"Inner join (common columns only):\")\nprint(inner_join)\n",[3516],{"type":393,"tag":423,"props":3517,"children":3518},{"__ignoreMap":6},[3519,3538,3545,3553,3569,3597,3626,3655,3662,3669,3685,3713,3741,3770,3777,3784,3804,3816,3827,3847,3859,3870,3877,3885,3918,3938,3950,3961,3968,3976,4026,4046],{"type":393,"tag":427,"props":3520,"children":3521},{"class":429,"line":11},[3522,3526,3530,3534],{"type":393,"tag":427,"props":3523,"children":3524},{"style":433},[3525],{"type":398,"value":436},{"type":393,"tag":427,"props":3527,"children":3528},{"style":439},[3529],{"type":398,"value":442},{"type":393,"tag":427,"props":3531,"children":3532},{"style":433},[3533],{"type":398,"value":447},{"type":393,"tag":427,"props":3535,"children":3536},{"style":439},[3537],{"type":398,"value":452},{"type":393,"tag":427,"props":3539,"children":3540},{"class":429,"line":27},[3541],{"type":393,"tag":427,"props":3542,"children":3543},{"emptyLinePlaceholder":12},[3544],{"type":398,"value":460},{"type":393,"tag":427,"props":3546,"children":3547},{"class":429,"line":36},[3548],{"type":393,"tag":427,"props":3549,"children":3550},{"style":466},[3551],{"type":398,"value":3552},"# DataFrames with some overlapping columns\n",{"type":393,"tag":427,"props":3554,"children":3555},{"class":429,"line":45},[3556,3561,3565],{"type":393,"tag":427,"props":3557,"children":3558},{"style":439},[3559],{"type":398,"value":3560},"df1 ",{"type":393,"tag":427,"props":3562,"children":3563},{"style":433},[3564],{"type":398,"value":482},{"type":393,"tag":427,"props":3566,"children":3567},{"style":439},[3568],{"type":398,"value":487},{"type":393,"tag":427,"props":3570,"children":3571},{"class":429,"line":54},[3572,3577,3581,3585,3589,3593],{"type":393,"tag":427,"props":3573,"children":3574},{"style":493},[3575],{"type":398,"value":3576},"    'A'",{"type":393,"tag":427,"props":3578,"children":3579},{"style":439},[3580],{"type":398,"value":501},{"type":393,"tag":427,"props":3582,"children":3583},{"style":545},[3584],{"type":398,"value":2062},{"type":393,"tag":427,"props":3586,"children":3587},{"style":439},[3588],{"type":398,"value":511},{"type":393,"tag":427,"props":3590,"children":3591},{"style":545},[3592],{"type":398,"value":2071},{"type":393,"tag":427,"props":3594,"children":3595},{"style":439},[3596],{"type":398,"value":530},{"type":393,"tag":427,"props":3598,"children":3599},{"class":429,"line":63},[3600,3605,3609,3613,3617,3622],{"type":393,"tag":427,"props":3601,"children":3602},{"style":493},[3603],{"type":398,"value":3604},"    'B'",{"type":393,"tag":427,"props":3606,"children":3607},{"style":439},[3608],{"type":398,"value":501},{"type":393,"tag":427,"props":3610,"children":3611},{"style":545},[3612],{"type":398,"value":1692},{"type":393,"tag":427,"props":3614,"children":3615},{"style":439},[3616],{"type":398,"value":511},{"type":393,"tag":427,"props":3618,"children":3619},{"style":545},[3620],{"type":398,"value":3621},"4",{"type":393,"tag":427,"props":3623,"children":3624},{"style":439},[3625],{"type":398,"value":530},{"type":393,"tag":427,"props":3627,"children":3628},{"class":429,"line":72},[3629,3634,3638,3642,3646,3651],{"type":393,"tag":427,"props":3630,"children":3631},{"style":493},[3632],{"type":398,"value":3633},"    'C'",{"type":393,"tag":427,"props":3635,"children":3636},{"style":439},[3637],{"type":398,"value":501},{"type":393,"tag":427,"props":3639,"children":3640},{"style":545},[3641],{"type":398,"value":1568},{"type":393,"tag":427,"props":3643,"children":3644},{"style":439},[3645],{"type":398,"value":511},{"type":393,"tag":427,"props":3647,"children":3648},{"style":545},[3649],{"type":398,"value":3650},"6",{"type":393,"tag":427,"props":3652,"children":3653},{"style":439},[3654],{"type":398,"value":571},{"type":393,"tag":427,"props":3656,"children":3657},{"class":429,"line":83},[3658],{"type":393,"tag":427,"props":3659,"children":3660},{"style":439},[3661],{"type":398,"value":579},{"type":393,"tag":427,"props":3663,"children":3664},{"class":429,"line":92},[3665],{"type":393,"tag":427,"props":3666,"children":3667},{"emptyLinePlaceholder":12},[3668],{"type":398,"value":460},{"type":393,"tag":427,"props":3670,"children":3671},{"class":429,"line":101},[3672,3677,3681],{"type":393,"tag":427,"props":3673,"children":3674},{"style":439},[3675],{"type":398,"value":3676},"df2 ",{"type":393,"tag":427,"props":3678,"children":3679},{"style":433},[3680],{"type":398,"value":482},{"type":393,"tag":427,"props":3682,"children":3683},{"style":439},[3684],{"type":398,"value":487},{"type":393,"tag":427,"props":3686,"children":3687},{"class":429,"line":110},[3688,3692,3696,3701,3705,3709],{"type":393,"tag":427,"props":3689,"children":3690},{"style":493},[3691],{"type":398,"value":3604},{"type":393,"tag":427,"props":3693,"children":3694},{"style":439},[3695],{"type":398,"value":501},{"type":393,"tag":427,"props":3697,"children":3698},{"style":545},[3699],{"type":398,"value":3700},"7",{"type":393,"tag":427,"props":3702,"children":3703},{"style":439},[3704],{"type":398,"value":511},{"type":393,"tag":427,"props":3706,"children":3707},{"style":545},[3708],{"type":398,"value":672},{"type":393,"tag":427,"props":3710,"children":3711},{"style":439},[3712],{"type":398,"value":530},{"type":393,"tag":427,"props":3714,"children":3715},{"class":429,"line":121},[3716,3720,3724,3729,3733,3737],{"type":393,"tag":427,"props":3717,"children":3718},{"style":493},[3719],{"type":398,"value":3633},{"type":393,"tag":427,"props":3721,"children":3722},{"style":439},[3723],{"type":398,"value":501},{"type":393,"tag":427,"props":3725,"children":3726},{"style":545},[3727],{"type":398,"value":3728},"9",{"type":393,"tag":427,"props":3730,"children":3731},{"style":439},[3732],{"type":398,"value":511},{"type":393,"tag":427,"props":3734,"children":3735},{"style":545},[3736],{"type":398,"value":548},{"type":393,"tag":427,"props":3738,"children":3739},{"style":439},[3740],{"type":398,"value":530},{"type":393,"tag":427,"props":3742,"children":3743},{"class":429,"line":130},[3744,3749,3753,3758,3762,3766],{"type":393,"tag":427,"props":3745,"children":3746},{"style":493},[3747],{"type":398,"value":3748},"    'D'",{"type":393,"tag":427,"props":3750,"children":3751},{"style":439},[3752],{"type":398,"value":501},{"type":393,"tag":427,"props":3754,"children":3755},{"style":545},[3756],{"type":398,"value":3757},"11",{"type":393,"tag":427,"props":3759,"children":3760},{"style":439},[3761],{"type":398,"value":511},{"type":393,"tag":427,"props":3763,"children":3764},{"style":545},[3765],{"type":398,"value":654},{"type":393,"tag":427,"props":3767,"children":3768},{"style":439},[3769],{"type":398,"value":571},{"type":393,"tag":427,"props":3771,"children":3772},{"class":429,"line":139},[3773],{"type":393,"tag":427,"props":3774,"children":3775},{"style":439},[3776],{"type":398,"value":579},{"type":393,"tag":427,"props":3778,"children":3779},{"class":429,"line":148},[3780],{"type":393,"tag":427,"props":3781,"children":3782},{"emptyLinePlaceholder":12},[3783],{"type":398,"value":460},{"type":393,"tag":427,"props":3785,"children":3786},{"class":429,"line":159},[3787,3791,3795,3800],{"type":393,"tag":427,"props":3788,"children":3789},{"style":545},[3790],{"type":398,"value":698},{"type":393,"tag":427,"props":3792,"children":3793},{"style":439},[3794],{"type":398,"value":703},{"type":393,"tag":427,"props":3796,"children":3797},{"style":493},[3798],{"type":398,"value":3799},"\"DataFrame 1:\"",{"type":393,"tag":427,"props":3801,"children":3802},{"style":439},[3803],{"type":398,"value":713},{"type":393,"tag":427,"props":3805,"children":3806},{"class":429,"line":168},[3807,3811],{"type":393,"tag":427,"props":3808,"children":3809},{"style":545},[3810],{"type":398,"value":698},{"type":393,"tag":427,"props":3812,"children":3813},{"style":439},[3814],{"type":398,"value":3815},"(df1)\n",{"type":393,"tag":427,"props":3817,"children":3818},{"class":429,"line":177},[3819,3823],{"type":393,"tag":427,"props":3820,"children":3821},{"style":545},[3822],{"type":398,"value":698},{"type":393,"tag":427,"props":3824,"children":3825},{"style":439},[3826],{"type":398,"value":737},{"type":393,"tag":427,"props":3828,"children":3829},{"class":429,"line":186},[3830,3834,3838,3843],{"type":393,"tag":427,"props":3831,"children":3832},{"style":545},[3833],{"type":398,"value":698},{"type":393,"tag":427,"props":3835,"children":3836},{"style":439},[3837],{"type":398,"value":703},{"type":393,"tag":427,"props":3839,"children":3840},{"style":493},[3841],{"type":398,"value":3842},"\"DataFrame 2:\"",{"type":393,"tag":427,"props":3844,"children":3845},{"style":439},[3846],{"type":398,"value":713},{"type":393,"tag":427,"props":3848,"children":3849},{"class":429,"line":197},[3850,3854],{"type":393,"tag":427,"props":3851,"children":3852},{"style":545},[3853],{"type":398,"value":698},{"type":393,"tag":427,"props":3855,"children":3856},{"style":439},[3857],{"type":398,"value":3858},"(df2)\n",{"type":393,"tag":427,"props":3860,"children":3861},{"class":429,"line":206},[3862,3866],{"type":393,"tag":427,"props":3863,"children":3864},{"style":545},[3865],{"type":398,"value":698},{"type":393,"tag":427,"props":3867,"children":3868},{"style":439},[3869],{"type":398,"value":737},{"type":393,"tag":427,"props":3871,"children":3872},{"class":429,"line":215},[3873],{"type":393,"tag":427,"props":3874,"children":3875},{"emptyLinePlaceholder":12},[3876],{"type":398,"value":460},{"type":393,"tag":427,"props":3878,"children":3879},{"class":429,"line":224},[3880],{"type":393,"tag":427,"props":3881,"children":3882},{"style":466},[3883],{"type":398,"value":3884},"# Outer join (default) - keeps all columns\n",{"type":393,"tag":427,"props":3886,"children":3887},{"class":429,"line":233},[3888,3893,3897,3902,3906,3910,3914],{"type":393,"tag":427,"props":3889,"children":3890},{"style":439},[3891],{"type":398,"value":3892},"outer_join ",{"type":393,"tag":427,"props":3894,"children":3895},{"style":433},[3896],{"type":398,"value":482},{"type":393,"tag":427,"props":3898,"children":3899},{"style":439},[3900],{"type":398,"value":3901}," pd.concat([df1, df2], ",{"type":393,"tag":427,"props":3903,"children":3904},{"style":815},[3905],{"type":398,"value":818},{"type":393,"tag":427,"props":3907,"children":3908},{"style":433},[3909],{"type":398,"value":482},{"type":393,"tag":427,"props":3911,"children":3912},{"style":545},[3913],{"type":398,"value":827},{"type":393,"tag":427,"props":3915,"children":3916},{"style":439},[3917],{"type":398,"value":713},{"type":393,"tag":427,"props":3919,"children":3920},{"class":429,"line":244},[3921,3925,3929,3934],{"type":393,"tag":427,"props":3922,"children":3923},{"style":545},[3924],{"type":398,"value":698},{"type":393,"tag":427,"props":3926,"children":3927},{"style":439},[3928],{"type":398,"value":703},{"type":393,"tag":427,"props":3930,"children":3931},{"style":493},[3932],{"type":398,"value":3933},"\"Outer join (all columns):\"",{"type":393,"tag":427,"props":3935,"children":3936},{"style":439},[3937],{"type":398,"value":713},{"type":393,"tag":427,"props":3939,"children":3940},{"class":429,"line":253},[3941,3945],{"type":393,"tag":427,"props":3942,"children":3943},{"style":545},[3944],{"type":398,"value":698},{"type":393,"tag":427,"props":3946,"children":3947},{"style":439},[3948],{"type":398,"value":3949},"(outer_join)\n",{"type":393,"tag":427,"props":3951,"children":3952},{"class":429,"line":262},[3953,3957],{"type":393,"tag":427,"props":3954,"children":3955},{"style":545},[3956],{"type":398,"value":698},{"type":393,"tag":427,"props":3958,"children":3959},{"style":439},[3960],{"type":398,"value":737},{"type":393,"tag":427,"props":3962,"children":3963},{"class":429,"line":271},[3964],{"type":393,"tag":427,"props":3965,"children":3966},{"emptyLinePlaceholder":12},[3967],{"type":398,"value":460},{"type":393,"tag":427,"props":3969,"children":3970},{"class":429,"line":281},[3971],{"type":393,"tag":427,"props":3972,"children":3973},{"style":466},[3974],{"type":398,"value":3975},"# Inner join - only common columns\n",{"type":393,"tag":427,"props":3977,"children":3978},{"class":429,"line":290},[3979,3984,3988,3992,3997,4001,4006,4010,4014,4018,4022],{"type":393,"tag":427,"props":3980,"children":3981},{"style":439},[3982],{"type":398,"value":3983},"inner_join ",{"type":393,"tag":427,"props":3985,"children":3986},{"style":433},[3987],{"type":398,"value":482},{"type":393,"tag":427,"props":3989,"children":3990},{"style":439},[3991],{"type":398,"value":3901},{"type":393,"tag":427,"props":3993,"children":3994},{"style":815},[3995],{"type":398,"value":3996},"join",{"type":393,"tag":427,"props":3998,"children":3999},{"style":433},[4000],{"type":398,"value":482},{"type":393,"tag":427,"props":4002,"children":4003},{"style":493},[4004],{"type":398,"value":4005},"'inner'",{"type":393,"tag":427,"props":4007,"children":4008},{"style":439},[4009],{"type":398,"value":511},{"type":393,"tag":427,"props":4011,"children":4012},{"style":815},[4013],{"type":398,"value":818},{"type":393,"tag":427,"props":4015,"children":4016},{"style":433},[4017],{"type":398,"value":482},{"type":393,"tag":427,"props":4019,"children":4020},{"style":545},[4021],{"type":398,"value":827},{"type":393,"tag":427,"props":4023,"children":4024},{"style":439},[4025],{"type":398,"value":713},{"type":393,"tag":427,"props":4027,"children":4028},{"class":429,"line":299},[4029,4033,4037,4042],{"type":393,"tag":427,"props":4030,"children":4031},{"style":545},[4032],{"type":398,"value":698},{"type":393,"tag":427,"props":4034,"children":4035},{"style":439},[4036],{"type":398,"value":703},{"type":393,"tag":427,"props":4038,"children":4039},{"style":493},[4040],{"type":398,"value":4041},"\"Inner join (common columns only):\"",{"type":393,"tag":427,"props":4043,"children":4044},{"style":439},[4045],{"type":398,"value":713},{"type":393,"tag":427,"props":4047,"children":4048},{"class":429,"line":308},[4049,4053],{"type":393,"tag":427,"props":4050,"children":4051},{"style":545},[4052],{"type":398,"value":698},{"type":393,"tag":427,"props":4054,"children":4055},{"style":439},[4056],{"type":398,"value":4057},"(inner_join)\n",{"type":393,"tag":865,"props":4059,"children":4061},{"id":4060},"real-world-example-monthly-reports",[4062],{"type":398,"value":4063},"📋 Real-World Example: Monthly Reports",{"type":393,"tag":401,"props":4065,"children":4066},{},[4067],{"type":398,"value":4068},"Let's combine multiple monthly reports into a comprehensive analysis:",{"type":393,"tag":412,"props":4070,"children":4071},{},[4072],{"type":393,"tag":416,"props":4073,"children":4075},{"className":418,"code":4074,"language":420,"meta":6,"style":6},"import pandas as pd\n\n# Create monthly data\nmonths = ['January', 'February', 'March']\nmonthly_data = []\n\nfor i, month in enumerate(months, 1):\n    month_df = pd.DataFrame({\n        'product': ['Laptop', 'Mouse', 'Keyboard'],\n        'sales': [10 + i*2, 20 + i*3, 15 + i*1],\n        'revenue': [(10 + i*2) * 1000, (20 + i*3) * 25, (15 + i*1) * 75]\n    })\n    monthly_data.append(month_df)\n\n# Show individual months\nfor i, month in enumerate(months):\n    print(f\"{month} sales:\")\n    print(monthly_data[i])\n    print()\n\n# Combine with month labels\nquarterly = pd.concat(monthly_data, \n                     keys=months, \n                     names=['Month', 'Product_Index'])\n\nprint(\"Quarterly summary with month labels:\")\nprint(quarterly)\nprint()\n\n# Flatten for analysis\nquarterly_flat = quarterly.reset_index()\nprint(\"Quarterly data for analysis:\")\nprint(quarterly_flat)\nprint()\n\n# Quick analysis: Total sales by product\nproduct_totals = quarterly_flat.groupby('product')[['sales', 'revenue']].sum()\nprint(\"Total sales by product:\")\nprint(product_totals)\n",[4076],{"type":393,"tag":423,"props":4077,"children":4078},{"__ignoreMap":6},[4079,4098,4105,4113,4157,4174,4181,4218,4234,4270,4357,4483,4491,4499,4506,4514,4538,4584,4596,4607,4614,4622,4638,4655,4689,4696,4716,4727,4738,4745,4753,4770,4790,4802,4813,4820,4828,4874,4894],{"type":393,"tag":427,"props":4080,"children":4081},{"class":429,"line":11},[4082,4086,4090,4094],{"type":393,"tag":427,"props":4083,"children":4084},{"style":433},[4085],{"type":398,"value":436},{"type":393,"tag":427,"props":4087,"children":4088},{"style":439},[4089],{"type":398,"value":442},{"type":393,"tag":427,"props":4091,"children":4092},{"style":433},[4093],{"type":398,"value":447},{"type":393,"tag":427,"props":4095,"children":4096},{"style":439},[4097],{"type":398,"value":452},{"type":393,"tag":427,"props":4099,"children":4100},{"class":429,"line":27},[4101],{"type":393,"tag":427,"props":4102,"children":4103},{"emptyLinePlaceholder":12},[4104],{"type":398,"value":460},{"type":393,"tag":427,"props":4106,"children":4107},{"class":429,"line":36},[4108],{"type":393,"tag":427,"props":4109,"children":4110},{"style":466},[4111],{"type":398,"value":4112},"# Create monthly data\n",{"type":393,"tag":427,"props":4114,"children":4115},{"class":429,"line":45},[4116,4121,4125,4130,4135,4139,4144,4148,4153],{"type":393,"tag":427,"props":4117,"children":4118},{"style":439},[4119],{"type":398,"value":4120},"months ",{"type":393,"tag":427,"props":4122,"children":4123},{"style":433},[4124],{"type":398,"value":482},{"type":393,"tag":427,"props":4126,"children":4127},{"style":439},[4128],{"type":398,"value":4129}," [",{"type":393,"tag":427,"props":4131,"children":4132},{"style":493},[4133],{"type":398,"value":4134},"'January'",{"type":393,"tag":427,"props":4136,"children":4137},{"style":439},[4138],{"type":398,"value":511},{"type":393,"tag":427,"props":4140,"children":4141},{"style":493},[4142],{"type":398,"value":4143},"'February'",{"type":393,"tag":427,"props":4145,"children":4146},{"style":439},[4147],{"type":398,"value":511},{"type":393,"tag":427,"props":4149,"children":4150},{"style":493},[4151],{"type":398,"value":4152},"'March'",{"type":393,"tag":427,"props":4154,"children":4155},{"style":439},[4156],{"type":398,"value":571},{"type":393,"tag":427,"props":4158,"children":4159},{"class":429,"line":54},[4160,4165,4169],{"type":393,"tag":427,"props":4161,"children":4162},{"style":439},[4163],{"type":398,"value":4164},"monthly_data ",{"type":393,"tag":427,"props":4166,"children":4167},{"style":433},[4168],{"type":398,"value":482},{"type":393,"tag":427,"props":4170,"children":4171},{"style":439},[4172],{"type":398,"value":4173}," []\n",{"type":393,"tag":427,"props":4175,"children":4176},{"class":429,"line":63},[4177],{"type":393,"tag":427,"props":4178,"children":4179},{"emptyLinePlaceholder":12},[4180],{"type":398,"value":460},{"type":393,"tag":427,"props":4182,"children":4183},{"class":429,"line":72},[4184,4189,4194,4199,4204,4209,4213],{"type":393,"tag":427,"props":4185,"children":4186},{"style":433},[4187],{"type":398,"value":4188},"for",{"type":393,"tag":427,"props":4190,"children":4191},{"style":439},[4192],{"type":398,"value":4193}," i, month ",{"type":393,"tag":427,"props":4195,"children":4196},{"style":433},[4197],{"type":398,"value":4198},"in",{"type":393,"tag":427,"props":4200,"children":4201},{"style":545},[4202],{"type":398,"value":4203}," enumerate",{"type":393,"tag":427,"props":4205,"children":4206},{"style":439},[4207],{"type":398,"value":4208},"(months, ",{"type":393,"tag":427,"props":4210,"children":4211},{"style":545},[4212],{"type":398,"value":2062},{"type":393,"tag":427,"props":4214,"children":4215},{"style":439},[4216],{"type":398,"value":4217},"):\n",{"type":393,"tag":427,"props":4219,"children":4220},{"class":429,"line":83},[4221,4226,4230],{"type":393,"tag":427,"props":4222,"children":4223},{"style":439},[4224],{"type":398,"value":4225},"    month_df ",{"type":393,"tag":427,"props":4227,"children":4228},{"style":433},[4229],{"type":398,"value":482},{"type":393,"tag":427,"props":4231,"children":4232},{"style":439},[4233],{"type":398,"value":487},{"type":393,"tag":427,"props":4235,"children":4236},{"class":429,"line":92},[4237,4242,4246,4250,4254,4258,4262,4266],{"type":393,"tag":427,"props":4238,"children":4239},{"style":493},[4240],{"type":398,"value":4241},"        'product'",{"type":393,"tag":427,"props":4243,"children":4244},{"style":439},[4245],{"type":398,"value":501},{"type":393,"tag":427,"props":4247,"children":4248},{"style":493},[4249],{"type":398,"value":506},{"type":393,"tag":427,"props":4251,"children":4252},{"style":439},[4253],{"type":398,"value":511},{"type":393,"tag":427,"props":4255,"children":4256},{"style":493},[4257],{"type":398,"value":516},{"type":393,"tag":427,"props":4259,"children":4260},{"style":439},[4261],{"type":398,"value":511},{"type":393,"tag":427,"props":4263,"children":4264},{"style":493},[4265],{"type":398,"value":525},{"type":393,"tag":427,"props":4267,"children":4268},{"style":439},[4269],{"type":398,"value":530},{"type":393,"tag":427,"props":4271,"children":4272},{"class":429,"line":101},[4273,4278,4282,4286,4291,4296,4301,4305,4309,4313,4317,4321,4325,4329,4333,4337,4341,4345,4349,4353],{"type":393,"tag":427,"props":4274,"children":4275},{"style":493},[4276],{"type":398,"value":4277},"        'sales'",{"type":393,"tag":427,"props":4279,"children":4280},{"style":439},[4281],{"type":398,"value":501},{"type":393,"tag":427,"props":4283,"children":4284},{"style":545},[4285],{"type":398,"value":548},{"type":393,"tag":427,"props":4287,"children":4288},{"style":433},[4289],{"type":398,"value":4290}," +",{"type":393,"tag":427,"props":4292,"children":4293},{"style":439},[4294],{"type":398,"value":4295}," i",{"type":393,"tag":427,"props":4297,"children":4298},{"style":433},[4299],{"type":398,"value":4300},"*",{"type":393,"tag":427,"props":4302,"children":4303},{"style":545},[4304],{"type":398,"value":2071},{"type":393,"tag":427,"props":4306,"children":4307},{"style":439},[4308],{"type":398,"value":511},{"type":393,"tag":427,"props":4310,"children":4311},{"style":545},[4312],{"type":398,"value":1577},{"type":393,"tag":427,"props":4314,"children":4315},{"style":433},[4316],{"type":398,"value":4290},{"type":393,"tag":427,"props":4318,"children":4319},{"style":439},[4320],{"type":398,"value":4295},{"type":393,"tag":427,"props":4322,"children":4323},{"style":433},[4324],{"type":398,"value":4300},{"type":393,"tag":427,"props":4326,"children":4327},{"style":545},[4328],{"type":398,"value":1692},{"type":393,"tag":427,"props":4330,"children":4331},{"style":439},[4332],{"type":398,"value":511},{"type":393,"tag":427,"props":4334,"children":4335},{"style":545},[4336],{"type":398,"value":566},{"type":393,"tag":427,"props":4338,"children":4339},{"style":433},[4340],{"type":398,"value":4290},{"type":393,"tag":427,"props":4342,"children":4343},{"style":439},[4344],{"type":398,"value":4295},{"type":393,"tag":427,"props":4346,"children":4347},{"style":433},[4348],{"type":398,"value":4300},{"type":393,"tag":427,"props":4350,"children":4351},{"style":545},[4352],{"type":398,"value":2062},{"type":393,"tag":427,"props":4354,"children":4355},{"style":439},[4356],{"type":398,"value":530},{"type":393,"tag":427,"props":4358,"children":4359},{"class":429,"line":110},[4360,4365,4370,4374,4378,4382,4386,4390,4395,4399,4404,4409,4413,4417,4421,4425,4429,4433,4437,4442,4446,4450,4454,4458,4462,4466,4470,4474,4479],{"type":393,"tag":427,"props":4361,"children":4362},{"style":493},[4363],{"type":398,"value":4364},"        'revenue'",{"type":393,"tag":427,"props":4366,"children":4367},{"style":439},[4368],{"type":398,"value":4369},": [(",{"type":393,"tag":427,"props":4371,"children":4372},{"style":545},[4373],{"type":398,"value":548},{"type":393,"tag":427,"props":4375,"children":4376},{"style":433},[4377],{"type":398,"value":4290},{"type":393,"tag":427,"props":4379,"children":4380},{"style":439},[4381],{"type":398,"value":4295},{"type":393,"tag":427,"props":4383,"children":4384},{"style":433},[4385],{"type":398,"value":4300},{"type":393,"tag":427,"props":4387,"children":4388},{"style":545},[4389],{"type":398,"value":2071},{"type":393,"tag":427,"props":4391,"children":4392},{"style":439},[4393],{"type":398,"value":4394},") ",{"type":393,"tag":427,"props":4396,"children":4397},{"style":433},[4398],{"type":398,"value":4300},{"type":393,"tag":427,"props":4400,"children":4401},{"style":545},[4402],{"type":398,"value":4403}," 1000",{"type":393,"tag":427,"props":4405,"children":4406},{"style":439},[4407],{"type":398,"value":4408},", (",{"type":393,"tag":427,"props":4410,"children":4411},{"style":545},[4412],{"type":398,"value":1577},{"type":393,"tag":427,"props":4414,"children":4415},{"style":433},[4416],{"type":398,"value":4290},{"type":393,"tag":427,"props":4418,"children":4419},{"style":439},[4420],{"type":398,"value":4295},{"type":393,"tag":427,"props":4422,"children":4423},{"style":433},[4424],{"type":398,"value":4300},{"type":393,"tag":427,"props":4426,"children":4427},{"style":545},[4428],{"type":398,"value":1692},{"type":393,"tag":427,"props":4430,"children":4431},{"style":439},[4432],{"type":398,"value":4394},{"type":393,"tag":427,"props":4434,"children":4435},{"style":433},[4436],{"type":398,"value":4300},{"type":393,"tag":427,"props":4438,"children":4439},{"style":545},[4440],{"type":398,"value":4441}," 25",{"type":393,"tag":427,"props":4443,"children":4444},{"style":439},[4445],{"type":398,"value":4408},{"type":393,"tag":427,"props":4447,"children":4448},{"style":545},[4449],{"type":398,"value":566},{"type":393,"tag":427,"props":4451,"children":4452},{"style":433},[4453],{"type":398,"value":4290},{"type":393,"tag":427,"props":4455,"children":4456},{"style":439},[4457],{"type":398,"value":4295},{"type":393,"tag":427,"props":4459,"children":4460},{"style":433},[4461],{"type":398,"value":4300},{"type":393,"tag":427,"props":4463,"children":4464},{"style":545},[4465],{"type":398,"value":2062},{"type":393,"tag":427,"props":4467,"children":4468},{"style":439},[4469],{"type":398,"value":4394},{"type":393,"tag":427,"props":4471,"children":4472},{"style":433},[4473],{"type":398,"value":4300},{"type":393,"tag":427,"props":4475,"children":4476},{"style":545},[4477],{"type":398,"value":4478}," 75",{"type":393,"tag":427,"props":4480,"children":4481},{"style":439},[4482],{"type":398,"value":571},{"type":393,"tag":427,"props":4484,"children":4485},{"class":429,"line":121},[4486],{"type":393,"tag":427,"props":4487,"children":4488},{"style":439},[4489],{"type":398,"value":4490},"    })\n",{"type":393,"tag":427,"props":4492,"children":4493},{"class":429,"line":130},[4494],{"type":393,"tag":427,"props":4495,"children":4496},{"style":439},[4497],{"type":398,"value":4498},"    monthly_data.append(month_df)\n",{"type":393,"tag":427,"props":4500,"children":4501},{"class":429,"line":139},[4502],{"type":393,"tag":427,"props":4503,"children":4504},{"emptyLinePlaceholder":12},[4505],{"type":398,"value":460},{"type":393,"tag":427,"props":4507,"children":4508},{"class":429,"line":148},[4509],{"type":393,"tag":427,"props":4510,"children":4511},{"style":466},[4512],{"type":398,"value":4513},"# Show individual months\n",{"type":393,"tag":427,"props":4515,"children":4516},{"class":429,"line":159},[4517,4521,4525,4529,4533],{"type":393,"tag":427,"props":4518,"children":4519},{"style":433},[4520],{"type":398,"value":4188},{"type":393,"tag":427,"props":4522,"children":4523},{"style":439},[4524],{"type":398,"value":4193},{"type":393,"tag":427,"props":4526,"children":4527},{"style":433},[4528],{"type":398,"value":4198},{"type":393,"tag":427,"props":4530,"children":4531},{"style":545},[4532],{"type":398,"value":4203},{"type":393,"tag":427,"props":4534,"children":4535},{"style":439},[4536],{"type":398,"value":4537},"(months):\n",{"type":393,"tag":427,"props":4539,"children":4540},{"class":429,"line":168},[4541,4546,4550,4555,4560,4565,4570,4575,4580],{"type":393,"tag":427,"props":4542,"children":4543},{"style":545},[4544],{"type":398,"value":4545},"    print",{"type":393,"tag":427,"props":4547,"children":4548},{"style":439},[4549],{"type":398,"value":703},{"type":393,"tag":427,"props":4551,"children":4552},{"style":433},[4553],{"type":398,"value":4554},"f",{"type":393,"tag":427,"props":4556,"children":4557},{"style":493},[4558],{"type":398,"value":4559},"\"",{"type":393,"tag":427,"props":4561,"children":4562},{"style":545},[4563],{"type":398,"value":4564},"{",{"type":393,"tag":427,"props":4566,"children":4567},{"style":439},[4568],{"type":398,"value":4569},"month",{"type":393,"tag":427,"props":4571,"children":4572},{"style":545},[4573],{"type":398,"value":4574},"}",{"type":393,"tag":427,"props":4576,"children":4577},{"style":493},[4578],{"type":398,"value":4579}," sales:\"",{"type":393,"tag":427,"props":4581,"children":4582},{"style":439},[4583],{"type":398,"value":713},{"type":393,"tag":427,"props":4585,"children":4586},{"class":429,"line":177},[4587,4591],{"type":393,"tag":427,"props":4588,"children":4589},{"style":545},[4590],{"type":398,"value":4545},{"type":393,"tag":427,"props":4592,"children":4593},{"style":439},[4594],{"type":398,"value":4595},"(monthly_data[i])\n",{"type":393,"tag":427,"props":4597,"children":4598},{"class":429,"line":186},[4599,4603],{"type":393,"tag":427,"props":4600,"children":4601},{"style":545},[4602],{"type":398,"value":4545},{"type":393,"tag":427,"props":4604,"children":4605},{"style":439},[4606],{"type":398,"value":737},{"type":393,"tag":427,"props":4608,"children":4609},{"class":429,"line":197},[4610],{"type":393,"tag":427,"props":4611,"children":4612},{"emptyLinePlaceholder":12},[4613],{"type":398,"value":460},{"type":393,"tag":427,"props":4615,"children":4616},{"class":429,"line":206},[4617],{"type":393,"tag":427,"props":4618,"children":4619},{"style":466},[4620],{"type":398,"value":4621},"# Combine with month labels\n",{"type":393,"tag":427,"props":4623,"children":4624},{"class":429,"line":215},[4625,4629,4633],{"type":393,"tag":427,"props":4626,"children":4627},{"style":439},[4628],{"type":398,"value":803},{"type":393,"tag":427,"props":4630,"children":4631},{"style":433},[4632],{"type":398,"value":482},{"type":393,"tag":427,"props":4634,"children":4635},{"style":439},[4636],{"type":398,"value":4637}," pd.concat(monthly_data, \n",{"type":393,"tag":427,"props":4639,"children":4640},{"class":429,"line":224},[4641,4646,4650],{"type":393,"tag":427,"props":4642,"children":4643},{"style":815},[4644],{"type":398,"value":4645},"                     keys",{"type":393,"tag":427,"props":4647,"children":4648},{"style":433},[4649],{"type":398,"value":482},{"type":393,"tag":427,"props":4651,"children":4652},{"style":439},[4653],{"type":398,"value":4654},"months, \n",{"type":393,"tag":427,"props":4656,"children":4657},{"class":429,"line":233},[4658,4663,4667,4671,4676,4680,4685],{"type":393,"tag":427,"props":4659,"children":4660},{"style":815},[4661],{"type":398,"value":4662},"                     names",{"type":393,"tag":427,"props":4664,"children":4665},{"style":433},[4666],{"type":398,"value":482},{"type":393,"tag":427,"props":4668,"children":4669},{"style":439},[4670],{"type":398,"value":2778},{"type":393,"tag":427,"props":4672,"children":4673},{"style":493},[4674],{"type":398,"value":4675},"'Month'",{"type":393,"tag":427,"props":4677,"children":4678},{"style":439},[4679],{"type":398,"value":511},{"type":393,"tag":427,"props":4681,"children":4682},{"style":493},[4683],{"type":398,"value":4684},"'Product_Index'",{"type":393,"tag":427,"props":4686,"children":4687},{"style":439},[4688],{"type":398,"value":2832},{"type":393,"tag":427,"props":4690,"children":4691},{"class":429,"line":244},[4692],{"type":393,"tag":427,"props":4693,"children":4694},{"emptyLinePlaceholder":12},[4695],{"type":398,"value":460},{"type":393,"tag":427,"props":4697,"children":4698},{"class":429,"line":253},[4699,4703,4707,4712],{"type":393,"tag":427,"props":4700,"children":4701},{"style":545},[4702],{"type":398,"value":698},{"type":393,"tag":427,"props":4704,"children":4705},{"style":439},[4706],{"type":398,"value":703},{"type":393,"tag":427,"props":4708,"children":4709},{"style":493},[4710],{"type":398,"value":4711},"\"Quarterly summary with month labels:\"",{"type":393,"tag":427,"props":4713,"children":4714},{"style":439},[4715],{"type":398,"value":713},{"type":393,"tag":427,"props":4717,"children":4718},{"class":429,"line":262},[4719,4723],{"type":393,"tag":427,"props":4720,"children":4721},{"style":545},[4722],{"type":398,"value":698},{"type":393,"tag":427,"props":4724,"children":4725},{"style":439},[4726],{"type":398,"value":863},{"type":393,"tag":427,"props":4728,"children":4729},{"class":429,"line":271},[4730,4734],{"type":393,"tag":427,"props":4731,"children":4732},{"style":545},[4733],{"type":398,"value":698},{"type":393,"tag":427,"props":4735,"children":4736},{"style":439},[4737],{"type":398,"value":737},{"type":393,"tag":427,"props":4739,"children":4740},{"class":429,"line":281},[4741],{"type":393,"tag":427,"props":4742,"children":4743},{"emptyLinePlaceholder":12},[4744],{"type":398,"value":460},{"type":393,"tag":427,"props":4746,"children":4747},{"class":429,"line":290},[4748],{"type":393,"tag":427,"props":4749,"children":4750},{"style":466},[4751],{"type":398,"value":4752},"# Flatten for analysis\n",{"type":393,"tag":427,"props":4754,"children":4755},{"class":429,"line":299},[4756,4761,4765],{"type":393,"tag":427,"props":4757,"children":4758},{"style":439},[4759],{"type":398,"value":4760},"quarterly_flat ",{"type":393,"tag":427,"props":4762,"children":4763},{"style":433},[4764],{"type":398,"value":482},{"type":393,"tag":427,"props":4766,"children":4767},{"style":439},[4768],{"type":398,"value":4769}," quarterly.reset_index()\n",{"type":393,"tag":427,"props":4771,"children":4772},{"class":429,"line":308},[4773,4777,4781,4786],{"type":393,"tag":427,"props":4774,"children":4775},{"style":545},[4776],{"type":398,"value":698},{"type":393,"tag":427,"props":4778,"children":4779},{"style":439},[4780],{"type":398,"value":703},{"type":393,"tag":427,"props":4782,"children":4783},{"style":493},[4784],{"type":398,"value":4785},"\"Quarterly data for analysis:\"",{"type":393,"tag":427,"props":4787,"children":4788},{"style":439},[4789],{"type":398,"value":713},{"type":393,"tag":427,"props":4791,"children":4792},{"class":429,"line":318},[4793,4797],{"type":393,"tag":427,"props":4794,"children":4795},{"style":545},[4796],{"type":398,"value":698},{"type":393,"tag":427,"props":4798,"children":4799},{"style":439},[4800],{"type":398,"value":4801},"(quarterly_flat)\n",{"type":393,"tag":427,"props":4803,"children":4804},{"class":429,"line":327},[4805,4809],{"type":393,"tag":427,"props":4806,"children":4807},{"style":545},[4808],{"type":398,"value":698},{"type":393,"tag":427,"props":4810,"children":4811},{"style":439},[4812],{"type":398,"value":737},{"type":393,"tag":427,"props":4814,"children":4815},{"class":429,"line":336},[4816],{"type":393,"tag":427,"props":4817,"children":4818},{"emptyLinePlaceholder":12},[4819],{"type":398,"value":460},{"type":393,"tag":427,"props":4821,"children":4822},{"class":429,"line":346},[4823],{"type":393,"tag":427,"props":4824,"children":4825},{"style":466},[4826],{"type":398,"value":4827},"# Quick analysis: Total sales by product\n",{"type":393,"tag":427,"props":4829,"children":4830},{"class":429,"line":355},[4831,4836,4840,4845,4850,4855,4860,4864,4869],{"type":393,"tag":427,"props":4832,"children":4833},{"style":439},[4834],{"type":398,"value":4835},"product_totals ",{"type":393,"tag":427,"props":4837,"children":4838},{"style":433},[4839],{"type":398,"value":482},{"type":393,"tag":427,"props":4841,"children":4842},{"style":439},[4843],{"type":398,"value":4844}," quarterly_flat.groupby(",{"type":393,"tag":427,"props":4846,"children":4847},{"style":493},[4848],{"type":398,"value":4849},"'product'",{"type":393,"tag":427,"props":4851,"children":4852},{"style":439},[4853],{"type":398,"value":4854},")[[",{"type":393,"tag":427,"props":4856,"children":4857},{"style":493},[4858],{"type":398,"value":4859},"'sales'",{"type":393,"tag":427,"props":4861,"children":4862},{"style":439},[4863],{"type":398,"value":511},{"type":393,"tag":427,"props":4865,"children":4866},{"style":493},[4867],{"type":398,"value":4868},"'revenue'",{"type":393,"tag":427,"props":4870,"children":4871},{"style":439},[4872],{"type":398,"value":4873},"]].sum()\n",{"type":393,"tag":427,"props":4875,"children":4876},{"class":429,"line":364},[4877,4881,4885,4890],{"type":393,"tag":427,"props":4878,"children":4879},{"style":545},[4880],{"type":398,"value":698},{"type":393,"tag":427,"props":4882,"children":4883},{"style":439},[4884],{"type":398,"value":703},{"type":393,"tag":427,"props":4886,"children":4887},{"style":493},[4888],{"type":398,"value":4889},"\"Total sales by product:\"",{"type":393,"tag":427,"props":4891,"children":4892},{"style":439},[4893],{"type":398,"value":713},{"type":393,"tag":427,"props":4895,"children":4896},{"class":429,"line":374},[4897,4901],{"type":393,"tag":427,"props":4898,"children":4899},{"style":545},[4900],{"type":398,"value":698},{"type":393,"tag":427,"props":4902,"children":4903},{"style":439},[4904],{"type":398,"value":4905},"(product_totals)\n",{"type":393,"tag":865,"props":4907,"children":4909},{"id":4908},"performance-and-best-practices",[4910],{"type":398,"value":4911},"⚡ Performance and Best Practices",{"type":393,"tag":877,"props":4913,"children":4917},{"emoji":4914,"title":4915,"type":4916},"⚡","Concatenation Best Practices","warning",[4918,4926,4951,4959,4977,4985,5056,5064],{"type":393,"tag":401,"props":4919,"children":4920},{},[4921],{"type":393,"tag":887,"props":4922,"children":4923},{},[4924],{"type":398,"value":4925},"Performance Tips:",{"type":393,"tag":893,"props":4927,"children":4928},{},[4929,4934,4946],{"type":393,"tag":897,"props":4930,"children":4931},{},[4932],{"type":398,"value":4933},"Concatenate multiple DataFrames at once rather than in a loop",{"type":393,"tag":897,"props":4935,"children":4936},{},[4937,4939,4944],{"type":398,"value":4938},"Use ",{"type":393,"tag":423,"props":4940,"children":4942},{"className":4941},[],[4943],{"type":398,"value":989},{"type":398,"value":4945}," when you don't need original indices",{"type":393,"tag":897,"props":4947,"children":4948},{},[4949],{"type":398,"value":4950},"Consider memory usage with large DataFrames",{"type":393,"tag":401,"props":4952,"children":4953},{},[4954],{"type":393,"tag":887,"props":4955,"children":4956},{},[4957],{"type":398,"value":4958},"Data Quality:",{"type":393,"tag":893,"props":4960,"children":4961},{},[4962,4967,4972],{"type":393,"tag":897,"props":4963,"children":4964},{},[4965],{"type":398,"value":4966},"Ensure column names match for vertical concatenation",{"type":393,"tag":897,"props":4968,"children":4969},{},[4970],{"type":398,"value":4971},"Check row counts for horizontal concatenation",{"type":393,"tag":897,"props":4973,"children":4974},{},[4975],{"type":398,"value":4976},"Handle missing values appropriately",{"type":393,"tag":401,"props":4978,"children":4979},{},[4980],{"type":393,"tag":887,"props":4981,"children":4982},{},[4983],{"type":398,"value":4984},"Good Practice:",{"type":393,"tag":416,"props":4986,"children":4988},{"className":418,"code":4987,"language":420,"meta":6,"style":6},"# Good: Concatenate all at once\nresult = pd.concat([df1, df2, df3, df4])\n\n# Avoid: Concatenating in a loop\n# result = df1\n# for df in [df2, df3, df4]:\n#     result = pd.concat([result, df])\n",[4989],{"type":393,"tag":423,"props":4990,"children":4991},{"__ignoreMap":6},[4992,5000,5017,5024,5032,5040,5048],{"type":393,"tag":427,"props":4993,"children":4994},{"class":429,"line":11},[4995],{"type":393,"tag":427,"props":4996,"children":4997},{"style":466},[4998],{"type":398,"value":4999},"# Good: Concatenate all at once\n",{"type":393,"tag":427,"props":5001,"children":5002},{"class":429,"line":27},[5003,5008,5012],{"type":393,"tag":427,"props":5004,"children":5005},{"style":439},[5006],{"type":398,"value":5007},"result ",{"type":393,"tag":427,"props":5009,"children":5010},{"style":433},[5011],{"type":398,"value":482},{"type":393,"tag":427,"props":5013,"children":5014},{"style":439},[5015],{"type":398,"value":5016}," pd.concat([df1, df2, df3, df4])\n",{"type":393,"tag":427,"props":5018,"children":5019},{"class":429,"line":36},[5020],{"type":393,"tag":427,"props":5021,"children":5022},{"emptyLinePlaceholder":12},[5023],{"type":398,"value":460},{"type":393,"tag":427,"props":5025,"children":5026},{"class":429,"line":45},[5027],{"type":393,"tag":427,"props":5028,"children":5029},{"style":466},[5030],{"type":398,"value":5031},"# Avoid: Concatenating in a loop\n",{"type":393,"tag":427,"props":5033,"children":5034},{"class":429,"line":54},[5035],{"type":393,"tag":427,"props":5036,"children":5037},{"style":466},[5038],{"type":398,"value":5039},"# result = df1\n",{"type":393,"tag":427,"props":5041,"children":5042},{"class":429,"line":63},[5043],{"type":393,"tag":427,"props":5044,"children":5045},{"style":466},[5046],{"type":398,"value":5047},"# for df in [df2, df3, df4]:\n",{"type":393,"tag":427,"props":5049,"children":5050},{"class":429,"line":72},[5051],{"type":393,"tag":427,"props":5052,"children":5053},{"style":466},[5054],{"type":398,"value":5055},"#     result = pd.concat([result, df])\n",{"type":393,"tag":401,"props":5057,"children":5058},{},[5059],{"type":393,"tag":887,"props":5060,"children":5061},{},[5062],{"type":398,"value":5063},"Validation:",{"type":393,"tag":893,"props":5065,"children":5066},{},[5067,5072,5077],{"type":393,"tag":897,"props":5068,"children":5069},{},[5070],{"type":398,"value":5071},"Check the shape of the result",{"type":393,"tag":897,"props":5073,"children":5074},{},[5075],{"type":398,"value":5076},"Verify all expected data is included",{"type":393,"tag":897,"props":5078,"children":5079},{},[5080],{"type":398,"value":5081},"Look for unexpected missing values",{"type":393,"tag":865,"props":5083,"children":5085},{"id":5084},"key-takeaways",[5086],{"type":398,"value":5087},"🎯 Key Takeaways",{"type":393,"tag":877,"props":5089,"children":5092},{"emoji":5090,"title":5091,"type":1922},"📚","Concatenation Summary",[5093,5101,5136,5144,5179,5186,5209,5217,5240],{"type":393,"tag":401,"props":5094,"children":5095},{},[5096],{"type":393,"tag":887,"props":5097,"children":5098},{},[5099],{"type":398,"value":5100},"Basic Syntax:",{"type":393,"tag":893,"props":5102,"children":5103},{},[5104,5115,5126],{"type":393,"tag":897,"props":5105,"children":5106},{},[5107,5113],{"type":393,"tag":423,"props":5108,"children":5110},{"className":5109},[],[5111],{"type":398,"value":5112},"pd.concat([df1, df2])",{"type":398,"value":5114}," - Vertical concatenation",{"type":393,"tag":897,"props":5116,"children":5117},{},[5118,5124],{"type":393,"tag":423,"props":5119,"children":5121},{"className":5120},[],[5122],{"type":398,"value":5123},"pd.concat([df1, df2], axis=1)",{"type":398,"value":5125}," - Horizontal concatenation",{"type":393,"tag":897,"props":5127,"children":5128},{},[5129,5134],{"type":393,"tag":423,"props":5130,"children":5132},{"className":5131},[],[5133],{"type":398,"value":989},{"type":398,"value":5135}," - Reset row numbers",{"type":393,"tag":401,"props":5137,"children":5138},{},[5139],{"type":393,"tag":887,"props":5140,"children":5141},{},[5142],{"type":398,"value":5143},"Common Parameters:",{"type":393,"tag":893,"props":5145,"children":5146},{},[5147,5157,5168],{"type":393,"tag":897,"props":5148,"children":5149},{},[5150,5155],{"type":393,"tag":423,"props":5151,"children":5153},{"className":5152},[],[5154],{"type":398,"value":1000},{"type":398,"value":5156}," - Add source labels",{"type":393,"tag":897,"props":5158,"children":5159},{},[5160,5166],{"type":393,"tag":423,"props":5161,"children":5163},{"className":5162},[],[5164],{"type":398,"value":5165},"join='inner'/'outer'",{"type":398,"value":5167}," - How to handle different columns",{"type":393,"tag":897,"props":5169,"children":5170},{},[5171,5177],{"type":393,"tag":423,"props":5172,"children":5174},{"className":5173},[],[5175],{"type":398,"value":5176},"names",{"type":398,"value":5178}," - Name the index levels",{"type":393,"tag":401,"props":5180,"children":5181},{},[5182],{"type":393,"tag":887,"props":5183,"children":5184},{},[5185],{"type":398,"value":3495},{"type":393,"tag":893,"props":5187,"children":5188},{},[5189,5194,5199,5204],{"type":393,"tag":897,"props":5190,"children":5191},{},[5192],{"type":398,"value":5193},"Monthly/quarterly reports",{"type":393,"tag":897,"props":5195,"children":5196},{},[5197],{"type":398,"value":5198},"Multiple data sources with same structure",{"type":393,"tag":897,"props":5200,"children":5201},{},[5202],{"type":398,"value":5203},"Time series data combination",{"type":393,"tag":897,"props":5205,"children":5206},{},[5207],{"type":398,"value":5208},"Adding new columns from related sources",{"type":393,"tag":401,"props":5210,"children":5211},{},[5212],{"type":393,"tag":887,"props":5213,"children":5214},{},[5215],{"type":398,"value":5216},"Best Practices:",{"type":393,"tag":893,"props":5218,"children":5219},{},[5220,5225,5230,5235],{"type":393,"tag":897,"props":5221,"children":5222},{},[5223],{"type":398,"value":5224},"Concatenate all DataFrames at once",{"type":393,"tag":897,"props":5226,"children":5227},{},[5228],{"type":398,"value":5229},"Use meaningful keys for source identification",{"type":393,"tag":897,"props":5231,"children":5232},{},[5233],{"type":398,"value":5234},"Validate results after concatenation",{"type":393,"tag":897,"props":5236,"children":5237},{},[5238],{"type":398,"value":5239},"Consider memory usage with large datasets",{"type":393,"tag":401,"props":5241,"children":5242},{},[5243,5248],{"type":393,"tag":887,"props":5244,"children":5245},{},[5246],{"type":398,"value":5247},"Remember:",{"type":398,"value":5249}," Concatenation is perfect for stacking similar data!",{"type":393,"tag":865,"props":5251,"children":5253},{"id":5252},"whats-next",[5254],{"type":398,"value":5255},"🚀 What's Next?",{"type":393,"tag":401,"props":5257,"children":5258},{},[5259],{"type":398,"value":5260},"Perfect! You now know how to concatenate DataFrames for simple data combination. Next, let's learn about merging and join operations - more sophisticated ways to combine related data.",{"type":393,"tag":401,"props":5262,"children":5263},{},[5264,5269,5271],{"type":393,"tag":887,"props":5265,"children":5266},{},[5267],{"type":398,"value":5268},"Continue to",{"type":398,"value":5270},": ",{"type":393,"tag":5272,"props":5273,"children":5274},"a",{"href":323},[5275],{"type":398,"value":324},{"type":393,"tag":401,"props":5277,"children":5278},{},[5279],{"type":398,"value":5280},"Keep concatenating! 📚🔗",{"type":393,"tag":5282,"props":5283,"children":5284},"style",{},[5285],{"type":398,"value":5286},"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":5288},[5289,5290,5293,5294,5295,5299,5300,5301,5302],{"id":867,"depth":27,"text":870},{"id":1005,"depth":27,"text":1008,"children":5291},[5292],{"id":1462,"depth":36,"text":1465},{"id":1909,"depth":27,"text":1912},{"id":2419,"depth":27,"text":2422},{"id":2942,"depth":27,"text":2945,"children":5296},[5297,5298],{"id":2948,"depth":36,"text":2951},{"id":3419,"depth":36,"text":3422},{"id":4060,"depth":27,"text":4063},{"id":4908,"depth":27,"text":4911},{"id":5084,"depth":27,"text":5087},{"id":5252,"depth":27,"text":5255},1782373726568]