[{"data":1,"prerenderedAt":4122},["ShallowReactive",2],{"tutorials-pandas":3,"category-items-pandas":387,"content-/pandas/reading-files":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,"expanded":12},"/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,"expanded":12},"/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",[78],{"_path":79,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":80,"description":81,"slug":82,"parentId":68,"order":83,"body":389,"_type":14,"_id":84,"_source":16,"_file":85,"_stem":86,"_extension":19},{"type":390,"children":391,"toc":4105},"root",[392,401,407,455,462,467,782,789,794,1022,1028,1033,1380,1386,1391,1479,1713,1719,1724,2116,2122,2127,2133,2519,2525,2630,2858,2864,2869,3478,3484,3655,3661,4069,4075,4080,4094,4099],{"type":393,"tag":394,"props":395,"children":397},"element","h1",{"id":396},"reading-files-csv-excel-json",[398],{"type":399,"value":400},"text","📄 Reading Files (CSV, Excel, JSON)",{"type":393,"tag":402,"props":403,"children":404},"p",{},[405],{"type":399,"value":406},"Loading data from files is one of the most important skills in data analysis. Let's learn how to read the three most common file formats: CSV, Excel, and JSON files.",{"type":393,"tag":408,"props":409,"children":413},"info-box",{"emoji":410,"title":411,"type":412},"📂","File Format Quick Guide","info",[414,425,435,445],{"type":393,"tag":402,"props":415,"children":416},{},[417,423],{"type":393,"tag":418,"props":419,"children":420},"strong",{},[421],{"type":399,"value":422},"CSV (.csv)",{"type":399,"value":424}," - Comma-separated values, like a simple spreadsheet",{"type":393,"tag":402,"props":426,"children":427},{},[428,433],{"type":393,"tag":418,"props":429,"children":430},{},[431],{"type":399,"value":432},"Excel (.xlsx, .xls)",{"type":399,"value":434}," - Microsoft Excel spreadsheets with formatting",{"type":393,"tag":402,"props":436,"children":437},{},[438,443],{"type":393,"tag":418,"props":439,"children":440},{},[441],{"type":399,"value":442},"JSON (.json)",{"type":399,"value":444}," - Web-friendly format, used by APIs and modern apps",{"type":393,"tag":402,"props":446,"children":447},{},[448,453],{"type":393,"tag":418,"props":449,"children":450},{},[451],{"type":399,"value":452},"All become DataFrames:",{"type":399,"value":454}," No matter the source format, Pandas converts everything into the same DataFrame structure!",{"type":393,"tag":456,"props":457,"children":459},"h2",{"id":458},"reading-csv-files",[460],{"type":399,"value":461},"📄 Reading CSV Files",{"type":393,"tag":402,"props":463,"children":464},{},[465],{"type":399,"value":466},"CSV is the most common format. It's simple and works everywhere:",{"type":393,"tag":468,"props":469,"children":470},"code-try",{},[471],{"type":393,"tag":472,"props":473,"children":477},"pre",{"className":474,"code":475,"language":476,"meta":6,"style":6},"language-python shiki shiki-themes github-light github-dark","import pandas as pd\n\n# Basic CSV reading\n# df = pd.read_csv('data.csv')\n\n# Let's simulate with sample data\nsample_csv_data = \"\"\"name,age,city\nAlice,25,New York\nBob,30,London\nCharlie,35,Tokyo\"\"\"\n\n# Save sample data to show loading\nwith open('sample.csv', 'w') as f:\n    f.write(sample_csv_data)\n\n# Now load it\ndf = pd.read_csv('sample.csv')\nprint(\"Loaded CSV data:\")\nprint(df)\nprint(f\"Shape: {df.shape}\")\n","python",[478],{"type":393,"tag":479,"props":480,"children":481},"code",{"__ignoreMap":6},[482,509,517,526,534,541,549,568,576,584,592,599,607,655,663,670,678,704,725,737],{"type":393,"tag":483,"props":484,"children":486},"span",{"class":485,"line":11},"line",[487,493,499,504],{"type":393,"tag":483,"props":488,"children":490},{"style":489},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[491],{"type":399,"value":492},"import",{"type":393,"tag":483,"props":494,"children":496},{"style":495},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[497],{"type":399,"value":498}," pandas ",{"type":393,"tag":483,"props":500,"children":501},{"style":489},[502],{"type":399,"value":503},"as",{"type":393,"tag":483,"props":505,"children":506},{"style":495},[507],{"type":399,"value":508}," pd\n",{"type":393,"tag":483,"props":510,"children":511},{"class":485,"line":27},[512],{"type":393,"tag":483,"props":513,"children":514},{"emptyLinePlaceholder":12},[515],{"type":399,"value":516},"\n",{"type":393,"tag":483,"props":518,"children":519},{"class":485,"line":36},[520],{"type":393,"tag":483,"props":521,"children":523},{"style":522},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[524],{"type":399,"value":525},"# Basic CSV reading\n",{"type":393,"tag":483,"props":527,"children":528},{"class":485,"line":45},[529],{"type":393,"tag":483,"props":530,"children":531},{"style":522},[532],{"type":399,"value":533},"# df = pd.read_csv('data.csv')\n",{"type":393,"tag":483,"props":535,"children":536},{"class":485,"line":54},[537],{"type":393,"tag":483,"props":538,"children":539},{"emptyLinePlaceholder":12},[540],{"type":399,"value":516},{"type":393,"tag":483,"props":542,"children":543},{"class":485,"line":63},[544],{"type":393,"tag":483,"props":545,"children":546},{"style":522},[547],{"type":399,"value":548},"# Let's simulate with sample data\n",{"type":393,"tag":483,"props":550,"children":551},{"class":485,"line":72},[552,557,562],{"type":393,"tag":483,"props":553,"children":554},{"style":495},[555],{"type":399,"value":556},"sample_csv_data ",{"type":393,"tag":483,"props":558,"children":559},{"style":489},[560],{"type":399,"value":561},"=",{"type":393,"tag":483,"props":563,"children":565},{"style":564},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[566],{"type":399,"value":567}," \"\"\"name,age,city\n",{"type":393,"tag":483,"props":569,"children":570},{"class":485,"line":83},[571],{"type":393,"tag":483,"props":572,"children":573},{"style":564},[574],{"type":399,"value":575},"Alice,25,New York\n",{"type":393,"tag":483,"props":577,"children":578},{"class":485,"line":92},[579],{"type":393,"tag":483,"props":580,"children":581},{"style":564},[582],{"type":399,"value":583},"Bob,30,London\n",{"type":393,"tag":483,"props":585,"children":586},{"class":485,"line":101},[587],{"type":393,"tag":483,"props":588,"children":589},{"style":564},[590],{"type":399,"value":591},"Charlie,35,Tokyo\"\"\"\n",{"type":393,"tag":483,"props":593,"children":594},{"class":485,"line":110},[595],{"type":393,"tag":483,"props":596,"children":597},{"emptyLinePlaceholder":12},[598],{"type":399,"value":516},{"type":393,"tag":483,"props":600,"children":601},{"class":485,"line":121},[602],{"type":393,"tag":483,"props":603,"children":604},{"style":522},[605],{"type":399,"value":606},"# Save sample data to show loading\n",{"type":393,"tag":483,"props":608,"children":609},{"class":485,"line":130},[610,615,621,626,631,636,641,646,650],{"type":393,"tag":483,"props":611,"children":612},{"style":489},[613],{"type":399,"value":614},"with",{"type":393,"tag":483,"props":616,"children":618},{"style":617},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[619],{"type":399,"value":620}," open",{"type":393,"tag":483,"props":622,"children":623},{"style":495},[624],{"type":399,"value":625},"(",{"type":393,"tag":483,"props":627,"children":628},{"style":564},[629],{"type":399,"value":630},"'sample.csv'",{"type":393,"tag":483,"props":632,"children":633},{"style":495},[634],{"type":399,"value":635},", ",{"type":393,"tag":483,"props":637,"children":638},{"style":564},[639],{"type":399,"value":640},"'w'",{"type":393,"tag":483,"props":642,"children":643},{"style":495},[644],{"type":399,"value":645},") ",{"type":393,"tag":483,"props":647,"children":648},{"style":489},[649],{"type":399,"value":503},{"type":393,"tag":483,"props":651,"children":652},{"style":495},[653],{"type":399,"value":654}," f:\n",{"type":393,"tag":483,"props":656,"children":657},{"class":485,"line":139},[658],{"type":393,"tag":483,"props":659,"children":660},{"style":495},[661],{"type":399,"value":662},"    f.write(sample_csv_data)\n",{"type":393,"tag":483,"props":664,"children":665},{"class":485,"line":148},[666],{"type":393,"tag":483,"props":667,"children":668},{"emptyLinePlaceholder":12},[669],{"type":399,"value":516},{"type":393,"tag":483,"props":671,"children":672},{"class":485,"line":159},[673],{"type":393,"tag":483,"props":674,"children":675},{"style":522},[676],{"type":399,"value":677},"# Now load it\n",{"type":393,"tag":483,"props":679,"children":680},{"class":485,"line":168},[681,686,690,695,699],{"type":393,"tag":483,"props":682,"children":683},{"style":495},[684],{"type":399,"value":685},"df ",{"type":393,"tag":483,"props":687,"children":688},{"style":489},[689],{"type":399,"value":561},{"type":393,"tag":483,"props":691,"children":692},{"style":495},[693],{"type":399,"value":694}," pd.read_csv(",{"type":393,"tag":483,"props":696,"children":697},{"style":564},[698],{"type":399,"value":630},{"type":393,"tag":483,"props":700,"children":701},{"style":495},[702],{"type":399,"value":703},")\n",{"type":393,"tag":483,"props":705,"children":706},{"class":485,"line":177},[707,712,716,721],{"type":393,"tag":483,"props":708,"children":709},{"style":617},[710],{"type":399,"value":711},"print",{"type":393,"tag":483,"props":713,"children":714},{"style":495},[715],{"type":399,"value":625},{"type":393,"tag":483,"props":717,"children":718},{"style":564},[719],{"type":399,"value":720},"\"Loaded CSV data:\"",{"type":393,"tag":483,"props":722,"children":723},{"style":495},[724],{"type":399,"value":703},{"type":393,"tag":483,"props":726,"children":727},{"class":485,"line":186},[728,732],{"type":393,"tag":483,"props":729,"children":730},{"style":617},[731],{"type":399,"value":711},{"type":393,"tag":483,"props":733,"children":734},{"style":495},[735],{"type":399,"value":736},"(df)\n",{"type":393,"tag":483,"props":738,"children":739},{"class":485,"line":197},[740,744,748,753,758,763,768,773,778],{"type":393,"tag":483,"props":741,"children":742},{"style":617},[743],{"type":399,"value":711},{"type":393,"tag":483,"props":745,"children":746},{"style":495},[747],{"type":399,"value":625},{"type":393,"tag":483,"props":749,"children":750},{"style":489},[751],{"type":399,"value":752},"f",{"type":393,"tag":483,"props":754,"children":755},{"style":564},[756],{"type":399,"value":757},"\"Shape: ",{"type":393,"tag":483,"props":759,"children":760},{"style":617},[761],{"type":399,"value":762},"{",{"type":393,"tag":483,"props":764,"children":765},{"style":495},[766],{"type":399,"value":767},"df.shape",{"type":393,"tag":483,"props":769,"children":770},{"style":617},[771],{"type":399,"value":772},"}",{"type":393,"tag":483,"props":774,"children":775},{"style":564},[776],{"type":399,"value":777},"\"",{"type":393,"tag":483,"props":779,"children":780},{"style":495},[781],{"type":399,"value":703},{"type":393,"tag":783,"props":784,"children":786},"h3",{"id":785},"csv-with-different-separators",[787],{"type":399,"value":788},"CSV with Different Separators",{"type":393,"tag":402,"props":790,"children":791},{},[792],{"type":399,"value":793},"Not all \"CSV\" files use commas:",{"type":393,"tag":468,"props":795,"children":796},{},[797],{"type":393,"tag":472,"props":798,"children":800},{"className":474,"code":799,"language":476,"meta":6,"style":6},"import pandas as pd\n\n# Create sample data with semicolons\nsample_data = \"\"\"name;age;salary\nAlice;25;50000\nBob;30;60000\nCharlie;35;70000\"\"\"\n\nwith open('sample_semicolon.csv', 'w') as f:\n    f.write(sample_data)\n\n# Load with different separator\ndf = pd.read_csv('sample_semicolon.csv', sep=';')\nprint(\"Data with semicolon separator:\")\nprint(df)\n",[801],{"type":393,"tag":479,"props":802,"children":803},{"__ignoreMap":6},[804,823,830,838,855,863,871,879,886,926,934,941,949,991,1011],{"type":393,"tag":483,"props":805,"children":806},{"class":485,"line":11},[807,811,815,819],{"type":393,"tag":483,"props":808,"children":809},{"style":489},[810],{"type":399,"value":492},{"type":393,"tag":483,"props":812,"children":813},{"style":495},[814],{"type":399,"value":498},{"type":393,"tag":483,"props":816,"children":817},{"style":489},[818],{"type":399,"value":503},{"type":393,"tag":483,"props":820,"children":821},{"style":495},[822],{"type":399,"value":508},{"type":393,"tag":483,"props":824,"children":825},{"class":485,"line":27},[826],{"type":393,"tag":483,"props":827,"children":828},{"emptyLinePlaceholder":12},[829],{"type":399,"value":516},{"type":393,"tag":483,"props":831,"children":832},{"class":485,"line":36},[833],{"type":393,"tag":483,"props":834,"children":835},{"style":522},[836],{"type":399,"value":837},"# Create sample data with semicolons\n",{"type":393,"tag":483,"props":839,"children":840},{"class":485,"line":45},[841,846,850],{"type":393,"tag":483,"props":842,"children":843},{"style":495},[844],{"type":399,"value":845},"sample_data ",{"type":393,"tag":483,"props":847,"children":848},{"style":489},[849],{"type":399,"value":561},{"type":393,"tag":483,"props":851,"children":852},{"style":564},[853],{"type":399,"value":854}," \"\"\"name;age;salary\n",{"type":393,"tag":483,"props":856,"children":857},{"class":485,"line":54},[858],{"type":393,"tag":483,"props":859,"children":860},{"style":564},[861],{"type":399,"value":862},"Alice;25;50000\n",{"type":393,"tag":483,"props":864,"children":865},{"class":485,"line":63},[866],{"type":393,"tag":483,"props":867,"children":868},{"style":564},[869],{"type":399,"value":870},"Bob;30;60000\n",{"type":393,"tag":483,"props":872,"children":873},{"class":485,"line":72},[874],{"type":393,"tag":483,"props":875,"children":876},{"style":564},[877],{"type":399,"value":878},"Charlie;35;70000\"\"\"\n",{"type":393,"tag":483,"props":880,"children":881},{"class":485,"line":83},[882],{"type":393,"tag":483,"props":883,"children":884},{"emptyLinePlaceholder":12},[885],{"type":399,"value":516},{"type":393,"tag":483,"props":887,"children":888},{"class":485,"line":92},[889,893,897,901,906,910,914,918,922],{"type":393,"tag":483,"props":890,"children":891},{"style":489},[892],{"type":399,"value":614},{"type":393,"tag":483,"props":894,"children":895},{"style":617},[896],{"type":399,"value":620},{"type":393,"tag":483,"props":898,"children":899},{"style":495},[900],{"type":399,"value":625},{"type":393,"tag":483,"props":902,"children":903},{"style":564},[904],{"type":399,"value":905},"'sample_semicolon.csv'",{"type":393,"tag":483,"props":907,"children":908},{"style":495},[909],{"type":399,"value":635},{"type":393,"tag":483,"props":911,"children":912},{"style":564},[913],{"type":399,"value":640},{"type":393,"tag":483,"props":915,"children":916},{"style":495},[917],{"type":399,"value":645},{"type":393,"tag":483,"props":919,"children":920},{"style":489},[921],{"type":399,"value":503},{"type":393,"tag":483,"props":923,"children":924},{"style":495},[925],{"type":399,"value":654},{"type":393,"tag":483,"props":927,"children":928},{"class":485,"line":101},[929],{"type":393,"tag":483,"props":930,"children":931},{"style":495},[932],{"type":399,"value":933},"    f.write(sample_data)\n",{"type":393,"tag":483,"props":935,"children":936},{"class":485,"line":110},[937],{"type":393,"tag":483,"props":938,"children":939},{"emptyLinePlaceholder":12},[940],{"type":399,"value":516},{"type":393,"tag":483,"props":942,"children":943},{"class":485,"line":121},[944],{"type":393,"tag":483,"props":945,"children":946},{"style":522},[947],{"type":399,"value":948},"# Load with different separator\n",{"type":393,"tag":483,"props":950,"children":951},{"class":485,"line":130},[952,956,960,964,968,972,978,982,987],{"type":393,"tag":483,"props":953,"children":954},{"style":495},[955],{"type":399,"value":685},{"type":393,"tag":483,"props":957,"children":958},{"style":489},[959],{"type":399,"value":561},{"type":393,"tag":483,"props":961,"children":962},{"style":495},[963],{"type":399,"value":694},{"type":393,"tag":483,"props":965,"children":966},{"style":564},[967],{"type":399,"value":905},{"type":393,"tag":483,"props":969,"children":970},{"style":495},[971],{"type":399,"value":635},{"type":393,"tag":483,"props":973,"children":975},{"style":974},"--shiki-default:#E36209;--shiki-app-dark-mode:#FFAB70",[976],{"type":399,"value":977},"sep",{"type":393,"tag":483,"props":979,"children":980},{"style":489},[981],{"type":399,"value":561},{"type":393,"tag":483,"props":983,"children":984},{"style":564},[985],{"type":399,"value":986},"';'",{"type":393,"tag":483,"props":988,"children":989},{"style":495},[990],{"type":399,"value":703},{"type":393,"tag":483,"props":992,"children":993},{"class":485,"line":139},[994,998,1002,1007],{"type":393,"tag":483,"props":995,"children":996},{"style":617},[997],{"type":399,"value":711},{"type":393,"tag":483,"props":999,"children":1000},{"style":495},[1001],{"type":399,"value":625},{"type":393,"tag":483,"props":1003,"children":1004},{"style":564},[1005],{"type":399,"value":1006},"\"Data with semicolon separator:\"",{"type":393,"tag":483,"props":1008,"children":1009},{"style":495},[1010],{"type":399,"value":703},{"type":393,"tag":483,"props":1012,"children":1013},{"class":485,"line":148},[1014,1018],{"type":393,"tag":483,"props":1015,"children":1016},{"style":617},[1017],{"type":399,"value":711},{"type":393,"tag":483,"props":1019,"children":1020},{"style":495},[1021],{"type":399,"value":736},{"type":393,"tag":456,"props":1023,"children":1025},{"id":1024},"reading-excel-files",[1026],{"type":399,"value":1027},"📊 Reading Excel Files",{"type":393,"tag":402,"props":1029,"children":1030},{},[1031],{"type":399,"value":1032},"Excel files are everywhere in business. Pandas makes them easy to read:",{"type":393,"tag":468,"props":1034,"children":1035},{},[1036],{"type":393,"tag":472,"props":1037,"children":1039},{"className":474,"code":1038,"language":476,"meta":6,"style":6},"import pandas as pd\n\n# For Excel files, you might need: pip install openpyxl\n\n# Basic Excel reading\n# df = pd.read_excel('data.xlsx')\n\n# Simulate Excel data (you'd normally load from actual .xlsx file)\nexcel_data = pd.DataFrame({\n    'product': ['Laptop', 'Mouse', 'Keyboard'],\n    'price': [999, 25, 75],\n    'stock': [10, 50, 30]\n})\n\n# Save as Excel to demonstrate\nexcel_data.to_excel('sample.xlsx', index=False)\n\n# Load it back\ndf = pd.read_excel('sample.xlsx')\nprint(\"Loaded Excel data:\")\nprint(df)\n",[1040],{"type":393,"tag":479,"props":1041,"children":1042},{"__ignoreMap":6},[1043,1062,1069,1077,1084,1092,1100,1107,1115,1132,1173,1212,1252,1260,1267,1275,1310,1317,1325,1349,1369],{"type":393,"tag":483,"props":1044,"children":1045},{"class":485,"line":11},[1046,1050,1054,1058],{"type":393,"tag":483,"props":1047,"children":1048},{"style":489},[1049],{"type":399,"value":492},{"type":393,"tag":483,"props":1051,"children":1052},{"style":495},[1053],{"type":399,"value":498},{"type":393,"tag":483,"props":1055,"children":1056},{"style":489},[1057],{"type":399,"value":503},{"type":393,"tag":483,"props":1059,"children":1060},{"style":495},[1061],{"type":399,"value":508},{"type":393,"tag":483,"props":1063,"children":1064},{"class":485,"line":27},[1065],{"type":393,"tag":483,"props":1066,"children":1067},{"emptyLinePlaceholder":12},[1068],{"type":399,"value":516},{"type":393,"tag":483,"props":1070,"children":1071},{"class":485,"line":36},[1072],{"type":393,"tag":483,"props":1073,"children":1074},{"style":522},[1075],{"type":399,"value":1076},"# For Excel files, you might need: pip install openpyxl\n",{"type":393,"tag":483,"props":1078,"children":1079},{"class":485,"line":45},[1080],{"type":393,"tag":483,"props":1081,"children":1082},{"emptyLinePlaceholder":12},[1083],{"type":399,"value":516},{"type":393,"tag":483,"props":1085,"children":1086},{"class":485,"line":54},[1087],{"type":393,"tag":483,"props":1088,"children":1089},{"style":522},[1090],{"type":399,"value":1091},"# Basic Excel reading\n",{"type":393,"tag":483,"props":1093,"children":1094},{"class":485,"line":63},[1095],{"type":393,"tag":483,"props":1096,"children":1097},{"style":522},[1098],{"type":399,"value":1099},"# df = pd.read_excel('data.xlsx')\n",{"type":393,"tag":483,"props":1101,"children":1102},{"class":485,"line":72},[1103],{"type":393,"tag":483,"props":1104,"children":1105},{"emptyLinePlaceholder":12},[1106],{"type":399,"value":516},{"type":393,"tag":483,"props":1108,"children":1109},{"class":485,"line":83},[1110],{"type":393,"tag":483,"props":1111,"children":1112},{"style":522},[1113],{"type":399,"value":1114},"# Simulate Excel data (you'd normally load from actual .xlsx file)\n",{"type":393,"tag":483,"props":1116,"children":1117},{"class":485,"line":92},[1118,1123,1127],{"type":393,"tag":483,"props":1119,"children":1120},{"style":495},[1121],{"type":399,"value":1122},"excel_data ",{"type":393,"tag":483,"props":1124,"children":1125},{"style":489},[1126],{"type":399,"value":561},{"type":393,"tag":483,"props":1128,"children":1129},{"style":495},[1130],{"type":399,"value":1131}," pd.DataFrame({\n",{"type":393,"tag":483,"props":1133,"children":1134},{"class":485,"line":101},[1135,1140,1145,1150,1154,1159,1163,1168],{"type":393,"tag":483,"props":1136,"children":1137},{"style":564},[1138],{"type":399,"value":1139},"    'product'",{"type":393,"tag":483,"props":1141,"children":1142},{"style":495},[1143],{"type":399,"value":1144},": [",{"type":393,"tag":483,"props":1146,"children":1147},{"style":564},[1148],{"type":399,"value":1149},"'Laptop'",{"type":393,"tag":483,"props":1151,"children":1152},{"style":495},[1153],{"type":399,"value":635},{"type":393,"tag":483,"props":1155,"children":1156},{"style":564},[1157],{"type":399,"value":1158},"'Mouse'",{"type":393,"tag":483,"props":1160,"children":1161},{"style":495},[1162],{"type":399,"value":635},{"type":393,"tag":483,"props":1164,"children":1165},{"style":564},[1166],{"type":399,"value":1167},"'Keyboard'",{"type":393,"tag":483,"props":1169,"children":1170},{"style":495},[1171],{"type":399,"value":1172},"],\n",{"type":393,"tag":483,"props":1174,"children":1175},{"class":485,"line":110},[1176,1181,1185,1190,1194,1199,1203,1208],{"type":393,"tag":483,"props":1177,"children":1178},{"style":564},[1179],{"type":399,"value":1180},"    'price'",{"type":393,"tag":483,"props":1182,"children":1183},{"style":495},[1184],{"type":399,"value":1144},{"type":393,"tag":483,"props":1186,"children":1187},{"style":617},[1188],{"type":399,"value":1189},"999",{"type":393,"tag":483,"props":1191,"children":1192},{"style":495},[1193],{"type":399,"value":635},{"type":393,"tag":483,"props":1195,"children":1196},{"style":617},[1197],{"type":399,"value":1198},"25",{"type":393,"tag":483,"props":1200,"children":1201},{"style":495},[1202],{"type":399,"value":635},{"type":393,"tag":483,"props":1204,"children":1205},{"style":617},[1206],{"type":399,"value":1207},"75",{"type":393,"tag":483,"props":1209,"children":1210},{"style":495},[1211],{"type":399,"value":1172},{"type":393,"tag":483,"props":1213,"children":1214},{"class":485,"line":121},[1215,1220,1224,1229,1233,1238,1242,1247],{"type":393,"tag":483,"props":1216,"children":1217},{"style":564},[1218],{"type":399,"value":1219},"    'stock'",{"type":393,"tag":483,"props":1221,"children":1222},{"style":495},[1223],{"type":399,"value":1144},{"type":393,"tag":483,"props":1225,"children":1226},{"style":617},[1227],{"type":399,"value":1228},"10",{"type":393,"tag":483,"props":1230,"children":1231},{"style":495},[1232],{"type":399,"value":635},{"type":393,"tag":483,"props":1234,"children":1235},{"style":617},[1236],{"type":399,"value":1237},"50",{"type":393,"tag":483,"props":1239,"children":1240},{"style":495},[1241],{"type":399,"value":635},{"type":393,"tag":483,"props":1243,"children":1244},{"style":617},[1245],{"type":399,"value":1246},"30",{"type":393,"tag":483,"props":1248,"children":1249},{"style":495},[1250],{"type":399,"value":1251},"]\n",{"type":393,"tag":483,"props":1253,"children":1254},{"class":485,"line":130},[1255],{"type":393,"tag":483,"props":1256,"children":1257},{"style":495},[1258],{"type":399,"value":1259},"})\n",{"type":393,"tag":483,"props":1261,"children":1262},{"class":485,"line":139},[1263],{"type":393,"tag":483,"props":1264,"children":1265},{"emptyLinePlaceholder":12},[1266],{"type":399,"value":516},{"type":393,"tag":483,"props":1268,"children":1269},{"class":485,"line":148},[1270],{"type":393,"tag":483,"props":1271,"children":1272},{"style":522},[1273],{"type":399,"value":1274},"# Save as Excel to demonstrate\n",{"type":393,"tag":483,"props":1276,"children":1277},{"class":485,"line":159},[1278,1283,1288,1292,1297,1301,1306],{"type":393,"tag":483,"props":1279,"children":1280},{"style":495},[1281],{"type":399,"value":1282},"excel_data.to_excel(",{"type":393,"tag":483,"props":1284,"children":1285},{"style":564},[1286],{"type":399,"value":1287},"'sample.xlsx'",{"type":393,"tag":483,"props":1289,"children":1290},{"style":495},[1291],{"type":399,"value":635},{"type":393,"tag":483,"props":1293,"children":1294},{"style":974},[1295],{"type":399,"value":1296},"index",{"type":393,"tag":483,"props":1298,"children":1299},{"style":489},[1300],{"type":399,"value":561},{"type":393,"tag":483,"props":1302,"children":1303},{"style":617},[1304],{"type":399,"value":1305},"False",{"type":393,"tag":483,"props":1307,"children":1308},{"style":495},[1309],{"type":399,"value":703},{"type":393,"tag":483,"props":1311,"children":1312},{"class":485,"line":168},[1313],{"type":393,"tag":483,"props":1314,"children":1315},{"emptyLinePlaceholder":12},[1316],{"type":399,"value":516},{"type":393,"tag":483,"props":1318,"children":1319},{"class":485,"line":177},[1320],{"type":393,"tag":483,"props":1321,"children":1322},{"style":522},[1323],{"type":399,"value":1324},"# Load it back\n",{"type":393,"tag":483,"props":1326,"children":1327},{"class":485,"line":186},[1328,1332,1336,1341,1345],{"type":393,"tag":483,"props":1329,"children":1330},{"style":495},[1331],{"type":399,"value":685},{"type":393,"tag":483,"props":1333,"children":1334},{"style":489},[1335],{"type":399,"value":561},{"type":393,"tag":483,"props":1337,"children":1338},{"style":495},[1339],{"type":399,"value":1340}," pd.read_excel(",{"type":393,"tag":483,"props":1342,"children":1343},{"style":564},[1344],{"type":399,"value":1287},{"type":393,"tag":483,"props":1346,"children":1347},{"style":495},[1348],{"type":399,"value":703},{"type":393,"tag":483,"props":1350,"children":1351},{"class":485,"line":197},[1352,1356,1360,1365],{"type":393,"tag":483,"props":1353,"children":1354},{"style":617},[1355],{"type":399,"value":711},{"type":393,"tag":483,"props":1357,"children":1358},{"style":495},[1359],{"type":399,"value":625},{"type":393,"tag":483,"props":1361,"children":1362},{"style":564},[1363],{"type":399,"value":1364},"\"Loaded Excel data:\"",{"type":393,"tag":483,"props":1366,"children":1367},{"style":495},[1368],{"type":399,"value":703},{"type":393,"tag":483,"props":1370,"children":1371},{"class":485,"line":206},[1372,1376],{"type":393,"tag":483,"props":1373,"children":1374},{"style":617},[1375],{"type":399,"value":711},{"type":393,"tag":483,"props":1377,"children":1378},{"style":495},[1379],{"type":399,"value":736},{"type":393,"tag":783,"props":1381,"children":1383},{"id":1382},"excel-with-multiple-sheets",[1384],{"type":399,"value":1385},"Excel with Multiple Sheets",{"type":393,"tag":402,"props":1387,"children":1388},{},[1389],{"type":399,"value":1390},"Excel files often have multiple worksheets:",{"type":393,"tag":408,"props":1392,"children":1395},{"emoji":1393,"title":1394,"type":412},"📊","Working with Multiple Excel Sheets",[1396,1404,1453,1461],{"type":393,"tag":402,"props":1397,"children":1398},{},[1399],{"type":393,"tag":418,"props":1400,"children":1401},{},[1402],{"type":399,"value":1403},"Sheet Selection Options:",{"type":393,"tag":1405,"props":1406,"children":1407},"ul",{},[1408,1420,1431,1442],{"type":393,"tag":1409,"props":1410,"children":1411},"li",{},[1412,1418],{"type":393,"tag":479,"props":1413,"children":1415},{"className":1414},[],[1416],{"type":399,"value":1417},"sheet_name='Sheet1'",{"type":399,"value":1419},": Load specific sheet by name",{"type":393,"tag":1409,"props":1421,"children":1422},{},[1423,1429],{"type":393,"tag":479,"props":1424,"children":1426},{"className":1425},[],[1427],{"type":399,"value":1428},"sheet_name=0",{"type":399,"value":1430},": Load first sheet (by index number)",{"type":393,"tag":1409,"props":1432,"children":1433},{},[1434,1440],{"type":393,"tag":479,"props":1435,"children":1437},{"className":1436},[],[1438],{"type":399,"value":1439},"sheet_name=None",{"type":399,"value":1441},": Load all sheets into a dictionary",{"type":393,"tag":1409,"props":1443,"children":1444},{},[1445,1451],{"type":393,"tag":479,"props":1446,"children":1448},{"className":1447},[],[1449],{"type":399,"value":1450},"sheet_name=[0, 1]",{"type":399,"value":1452},": Load multiple specific sheets",{"type":393,"tag":402,"props":1454,"children":1455},{},[1456],{"type":393,"tag":418,"props":1457,"children":1458},{},[1459],{"type":399,"value":1460},"Common Use Cases:",{"type":393,"tag":1405,"props":1462,"children":1463},{},[1464,1469,1474],{"type":393,"tag":1409,"props":1465,"children":1466},{},[1467],{"type":399,"value":1468},"Monthly reports on separate sheets",{"type":393,"tag":1409,"props":1470,"children":1471},{},[1472],{"type":399,"value":1473},"Summary and detail data views",{"type":393,"tag":1409,"props":1475,"children":1476},{},[1477],{"type":399,"value":1478},"Different data types organized by sheet",{"type":393,"tag":468,"props":1480,"children":1481},{},[1482],{"type":393,"tag":472,"props":1483,"children":1485},{"className":474,"code":1484,"language":476,"meta":6,"style":6},"import pandas as pd\n\n# Reading specific sheet\n# df = pd.read_excel('data.xlsx', sheet_name='Sales')\n\n# See all sheet names\n# sheet_names = pd.ExcelFile('data.xlsx').sheet_names\n# print(\"Available sheets:\", sheet_names)\n\n# Example sheet operations\ndf_sheet1 = pd.read_excel('file.xlsx', sheet_name='Sheet1')\ndf_first = pd.read_excel('file.xlsx', sheet_name=0)  # First sheet\nall_sheets = pd.read_excel('file.xlsx', sheet_name=None)  # All sheets\n",[1486],{"type":393,"tag":479,"props":1487,"children":1488},{"__ignoreMap":6},[1489,1508,1515,1523,1531,1538,1546,1554,1562,1569,1577,1620,1667],{"type":393,"tag":483,"props":1490,"children":1491},{"class":485,"line":11},[1492,1496,1500,1504],{"type":393,"tag":483,"props":1493,"children":1494},{"style":489},[1495],{"type":399,"value":492},{"type":393,"tag":483,"props":1497,"children":1498},{"style":495},[1499],{"type":399,"value":498},{"type":393,"tag":483,"props":1501,"children":1502},{"style":489},[1503],{"type":399,"value":503},{"type":393,"tag":483,"props":1505,"children":1506},{"style":495},[1507],{"type":399,"value":508},{"type":393,"tag":483,"props":1509,"children":1510},{"class":485,"line":27},[1511],{"type":393,"tag":483,"props":1512,"children":1513},{"emptyLinePlaceholder":12},[1514],{"type":399,"value":516},{"type":393,"tag":483,"props":1516,"children":1517},{"class":485,"line":36},[1518],{"type":393,"tag":483,"props":1519,"children":1520},{"style":522},[1521],{"type":399,"value":1522},"# Reading specific sheet\n",{"type":393,"tag":483,"props":1524,"children":1525},{"class":485,"line":45},[1526],{"type":393,"tag":483,"props":1527,"children":1528},{"style":522},[1529],{"type":399,"value":1530},"# df = pd.read_excel('data.xlsx', sheet_name='Sales')\n",{"type":393,"tag":483,"props":1532,"children":1533},{"class":485,"line":54},[1534],{"type":393,"tag":483,"props":1535,"children":1536},{"emptyLinePlaceholder":12},[1537],{"type":399,"value":516},{"type":393,"tag":483,"props":1539,"children":1540},{"class":485,"line":63},[1541],{"type":393,"tag":483,"props":1542,"children":1543},{"style":522},[1544],{"type":399,"value":1545},"# See all sheet names\n",{"type":393,"tag":483,"props":1547,"children":1548},{"class":485,"line":72},[1549],{"type":393,"tag":483,"props":1550,"children":1551},{"style":522},[1552],{"type":399,"value":1553},"# sheet_names = pd.ExcelFile('data.xlsx').sheet_names\n",{"type":393,"tag":483,"props":1555,"children":1556},{"class":485,"line":83},[1557],{"type":393,"tag":483,"props":1558,"children":1559},{"style":522},[1560],{"type":399,"value":1561},"# print(\"Available sheets:\", sheet_names)\n",{"type":393,"tag":483,"props":1563,"children":1564},{"class":485,"line":92},[1565],{"type":393,"tag":483,"props":1566,"children":1567},{"emptyLinePlaceholder":12},[1568],{"type":399,"value":516},{"type":393,"tag":483,"props":1570,"children":1571},{"class":485,"line":101},[1572],{"type":393,"tag":483,"props":1573,"children":1574},{"style":522},[1575],{"type":399,"value":1576},"# Example sheet operations\n",{"type":393,"tag":483,"props":1578,"children":1579},{"class":485,"line":110},[1580,1585,1589,1593,1598,1602,1607,1611,1616],{"type":393,"tag":483,"props":1581,"children":1582},{"style":495},[1583],{"type":399,"value":1584},"df_sheet1 ",{"type":393,"tag":483,"props":1586,"children":1587},{"style":489},[1588],{"type":399,"value":561},{"type":393,"tag":483,"props":1590,"children":1591},{"style":495},[1592],{"type":399,"value":1340},{"type":393,"tag":483,"props":1594,"children":1595},{"style":564},[1596],{"type":399,"value":1597},"'file.xlsx'",{"type":393,"tag":483,"props":1599,"children":1600},{"style":495},[1601],{"type":399,"value":635},{"type":393,"tag":483,"props":1603,"children":1604},{"style":974},[1605],{"type":399,"value":1606},"sheet_name",{"type":393,"tag":483,"props":1608,"children":1609},{"style":489},[1610],{"type":399,"value":561},{"type":393,"tag":483,"props":1612,"children":1613},{"style":564},[1614],{"type":399,"value":1615},"'Sheet1'",{"type":393,"tag":483,"props":1617,"children":1618},{"style":495},[1619],{"type":399,"value":703},{"type":393,"tag":483,"props":1621,"children":1622},{"class":485,"line":121},[1623,1628,1632,1636,1640,1644,1648,1652,1657,1662],{"type":393,"tag":483,"props":1624,"children":1625},{"style":495},[1626],{"type":399,"value":1627},"df_first ",{"type":393,"tag":483,"props":1629,"children":1630},{"style":489},[1631],{"type":399,"value":561},{"type":393,"tag":483,"props":1633,"children":1634},{"style":495},[1635],{"type":399,"value":1340},{"type":393,"tag":483,"props":1637,"children":1638},{"style":564},[1639],{"type":399,"value":1597},{"type":393,"tag":483,"props":1641,"children":1642},{"style":495},[1643],{"type":399,"value":635},{"type":393,"tag":483,"props":1645,"children":1646},{"style":974},[1647],{"type":399,"value":1606},{"type":393,"tag":483,"props":1649,"children":1650},{"style":489},[1651],{"type":399,"value":561},{"type":393,"tag":483,"props":1653,"children":1654},{"style":617},[1655],{"type":399,"value":1656},"0",{"type":393,"tag":483,"props":1658,"children":1659},{"style":495},[1660],{"type":399,"value":1661},")  ",{"type":393,"tag":483,"props":1663,"children":1664},{"style":522},[1665],{"type":399,"value":1666},"# First sheet\n",{"type":393,"tag":483,"props":1668,"children":1669},{"class":485,"line":130},[1670,1675,1679,1683,1687,1691,1695,1699,1704,1708],{"type":393,"tag":483,"props":1671,"children":1672},{"style":495},[1673],{"type":399,"value":1674},"all_sheets ",{"type":393,"tag":483,"props":1676,"children":1677},{"style":489},[1678],{"type":399,"value":561},{"type":393,"tag":483,"props":1680,"children":1681},{"style":495},[1682],{"type":399,"value":1340},{"type":393,"tag":483,"props":1684,"children":1685},{"style":564},[1686],{"type":399,"value":1597},{"type":393,"tag":483,"props":1688,"children":1689},{"style":495},[1690],{"type":399,"value":635},{"type":393,"tag":483,"props":1692,"children":1693},{"style":974},[1694],{"type":399,"value":1606},{"type":393,"tag":483,"props":1696,"children":1697},{"style":489},[1698],{"type":399,"value":561},{"type":393,"tag":483,"props":1700,"children":1701},{"style":617},[1702],{"type":399,"value":1703},"None",{"type":393,"tag":483,"props":1705,"children":1706},{"style":495},[1707],{"type":399,"value":1661},{"type":393,"tag":483,"props":1709,"children":1710},{"style":522},[1711],{"type":399,"value":1712},"# All sheets\n",{"type":393,"tag":456,"props":1714,"children":1716},{"id":1715},"reading-json-files",[1717],{"type":399,"value":1718},"🌐 Reading JSON Files",{"type":393,"tag":402,"props":1720,"children":1721},{},[1722],{"type":399,"value":1723},"JSON is popular for web data and APIs:",{"type":393,"tag":468,"props":1725,"children":1726},{},[1727],{"type":393,"tag":472,"props":1728,"children":1730},{"className":474,"code":1729,"language":476,"meta":6,"style":6},"import pandas as pd\nimport json\n\n# Create sample JSON data\njson_data = [\n    {\"name\": \"Alice\", \"age\": 25, \"city\": \"New York\"},\n    {\"name\": \"Bob\", \"age\": 30, \"city\": \"London\"},\n    {\"name\": \"Charlie\", \"age\": 35, \"city\": \"Tokyo\"}\n]\n\n# Save as JSON file\nwith open('sample.json', 'w') as f:\n    json.dump(json_data, f)\n\n# Load JSON file\ndf = pd.read_json('sample.json')\nprint(\"Loaded JSON data:\")\nprint(df)\n",[1731],{"type":393,"tag":479,"props":1732,"children":1733},{"__ignoreMap":6},[1734,1753,1765,1772,1780,1797,1860,1917,1976,1983,1990,1998,2038,2046,2053,2061,2085,2105],{"type":393,"tag":483,"props":1735,"children":1736},{"class":485,"line":11},[1737,1741,1745,1749],{"type":393,"tag":483,"props":1738,"children":1739},{"style":489},[1740],{"type":399,"value":492},{"type":393,"tag":483,"props":1742,"children":1743},{"style":495},[1744],{"type":399,"value":498},{"type":393,"tag":483,"props":1746,"children":1747},{"style":489},[1748],{"type":399,"value":503},{"type":393,"tag":483,"props":1750,"children":1751},{"style":495},[1752],{"type":399,"value":508},{"type":393,"tag":483,"props":1754,"children":1755},{"class":485,"line":27},[1756,1760],{"type":393,"tag":483,"props":1757,"children":1758},{"style":489},[1759],{"type":399,"value":492},{"type":393,"tag":483,"props":1761,"children":1762},{"style":495},[1763],{"type":399,"value":1764}," json\n",{"type":393,"tag":483,"props":1766,"children":1767},{"class":485,"line":36},[1768],{"type":393,"tag":483,"props":1769,"children":1770},{"emptyLinePlaceholder":12},[1771],{"type":399,"value":516},{"type":393,"tag":483,"props":1773,"children":1774},{"class":485,"line":45},[1775],{"type":393,"tag":483,"props":1776,"children":1777},{"style":522},[1778],{"type":399,"value":1779},"# Create sample JSON data\n",{"type":393,"tag":483,"props":1781,"children":1782},{"class":485,"line":54},[1783,1788,1792],{"type":393,"tag":483,"props":1784,"children":1785},{"style":495},[1786],{"type":399,"value":1787},"json_data ",{"type":393,"tag":483,"props":1789,"children":1790},{"style":489},[1791],{"type":399,"value":561},{"type":393,"tag":483,"props":1793,"children":1794},{"style":495},[1795],{"type":399,"value":1796}," [\n",{"type":393,"tag":483,"props":1798,"children":1799},{"class":485,"line":63},[1800,1805,1810,1815,1820,1824,1829,1833,1837,1841,1846,1850,1855],{"type":393,"tag":483,"props":1801,"children":1802},{"style":495},[1803],{"type":399,"value":1804},"    {",{"type":393,"tag":483,"props":1806,"children":1807},{"style":564},[1808],{"type":399,"value":1809},"\"name\"",{"type":393,"tag":483,"props":1811,"children":1812},{"style":495},[1813],{"type":399,"value":1814},": ",{"type":393,"tag":483,"props":1816,"children":1817},{"style":564},[1818],{"type":399,"value":1819},"\"Alice\"",{"type":393,"tag":483,"props":1821,"children":1822},{"style":495},[1823],{"type":399,"value":635},{"type":393,"tag":483,"props":1825,"children":1826},{"style":564},[1827],{"type":399,"value":1828},"\"age\"",{"type":393,"tag":483,"props":1830,"children":1831},{"style":495},[1832],{"type":399,"value":1814},{"type":393,"tag":483,"props":1834,"children":1835},{"style":617},[1836],{"type":399,"value":1198},{"type":393,"tag":483,"props":1838,"children":1839},{"style":495},[1840],{"type":399,"value":635},{"type":393,"tag":483,"props":1842,"children":1843},{"style":564},[1844],{"type":399,"value":1845},"\"city\"",{"type":393,"tag":483,"props":1847,"children":1848},{"style":495},[1849],{"type":399,"value":1814},{"type":393,"tag":483,"props":1851,"children":1852},{"style":564},[1853],{"type":399,"value":1854},"\"New York\"",{"type":393,"tag":483,"props":1856,"children":1857},{"style":495},[1858],{"type":399,"value":1859},"},\n",{"type":393,"tag":483,"props":1861,"children":1862},{"class":485,"line":72},[1863,1867,1871,1875,1880,1884,1888,1892,1896,1900,1904,1908,1913],{"type":393,"tag":483,"props":1864,"children":1865},{"style":495},[1866],{"type":399,"value":1804},{"type":393,"tag":483,"props":1868,"children":1869},{"style":564},[1870],{"type":399,"value":1809},{"type":393,"tag":483,"props":1872,"children":1873},{"style":495},[1874],{"type":399,"value":1814},{"type":393,"tag":483,"props":1876,"children":1877},{"style":564},[1878],{"type":399,"value":1879},"\"Bob\"",{"type":393,"tag":483,"props":1881,"children":1882},{"style":495},[1883],{"type":399,"value":635},{"type":393,"tag":483,"props":1885,"children":1886},{"style":564},[1887],{"type":399,"value":1828},{"type":393,"tag":483,"props":1889,"children":1890},{"style":495},[1891],{"type":399,"value":1814},{"type":393,"tag":483,"props":1893,"children":1894},{"style":617},[1895],{"type":399,"value":1246},{"type":393,"tag":483,"props":1897,"children":1898},{"style":495},[1899],{"type":399,"value":635},{"type":393,"tag":483,"props":1901,"children":1902},{"style":564},[1903],{"type":399,"value":1845},{"type":393,"tag":483,"props":1905,"children":1906},{"style":495},[1907],{"type":399,"value":1814},{"type":393,"tag":483,"props":1909,"children":1910},{"style":564},[1911],{"type":399,"value":1912},"\"London\"",{"type":393,"tag":483,"props":1914,"children":1915},{"style":495},[1916],{"type":399,"value":1859},{"type":393,"tag":483,"props":1918,"children":1919},{"class":485,"line":83},[1920,1924,1928,1932,1937,1941,1945,1949,1954,1958,1962,1966,1971],{"type":393,"tag":483,"props":1921,"children":1922},{"style":495},[1923],{"type":399,"value":1804},{"type":393,"tag":483,"props":1925,"children":1926},{"style":564},[1927],{"type":399,"value":1809},{"type":393,"tag":483,"props":1929,"children":1930},{"style":495},[1931],{"type":399,"value":1814},{"type":393,"tag":483,"props":1933,"children":1934},{"style":564},[1935],{"type":399,"value":1936},"\"Charlie\"",{"type":393,"tag":483,"props":1938,"children":1939},{"style":495},[1940],{"type":399,"value":635},{"type":393,"tag":483,"props":1942,"children":1943},{"style":564},[1944],{"type":399,"value":1828},{"type":393,"tag":483,"props":1946,"children":1947},{"style":495},[1948],{"type":399,"value":1814},{"type":393,"tag":483,"props":1950,"children":1951},{"style":617},[1952],{"type":399,"value":1953},"35",{"type":393,"tag":483,"props":1955,"children":1956},{"style":495},[1957],{"type":399,"value":635},{"type":393,"tag":483,"props":1959,"children":1960},{"style":564},[1961],{"type":399,"value":1845},{"type":393,"tag":483,"props":1963,"children":1964},{"style":495},[1965],{"type":399,"value":1814},{"type":393,"tag":483,"props":1967,"children":1968},{"style":564},[1969],{"type":399,"value":1970},"\"Tokyo\"",{"type":393,"tag":483,"props":1972,"children":1973},{"style":495},[1974],{"type":399,"value":1975},"}\n",{"type":393,"tag":483,"props":1977,"children":1978},{"class":485,"line":92},[1979],{"type":393,"tag":483,"props":1980,"children":1981},{"style":495},[1982],{"type":399,"value":1251},{"type":393,"tag":483,"props":1984,"children":1985},{"class":485,"line":101},[1986],{"type":393,"tag":483,"props":1987,"children":1988},{"emptyLinePlaceholder":12},[1989],{"type":399,"value":516},{"type":393,"tag":483,"props":1991,"children":1992},{"class":485,"line":110},[1993],{"type":393,"tag":483,"props":1994,"children":1995},{"style":522},[1996],{"type":399,"value":1997},"# Save as JSON file\n",{"type":393,"tag":483,"props":1999,"children":2000},{"class":485,"line":121},[2001,2005,2009,2013,2018,2022,2026,2030,2034],{"type":393,"tag":483,"props":2002,"children":2003},{"style":489},[2004],{"type":399,"value":614},{"type":393,"tag":483,"props":2006,"children":2007},{"style":617},[2008],{"type":399,"value":620},{"type":393,"tag":483,"props":2010,"children":2011},{"style":495},[2012],{"type":399,"value":625},{"type":393,"tag":483,"props":2014,"children":2015},{"style":564},[2016],{"type":399,"value":2017},"'sample.json'",{"type":393,"tag":483,"props":2019,"children":2020},{"style":495},[2021],{"type":399,"value":635},{"type":393,"tag":483,"props":2023,"children":2024},{"style":564},[2025],{"type":399,"value":640},{"type":393,"tag":483,"props":2027,"children":2028},{"style":495},[2029],{"type":399,"value":645},{"type":393,"tag":483,"props":2031,"children":2032},{"style":489},[2033],{"type":399,"value":503},{"type":393,"tag":483,"props":2035,"children":2036},{"style":495},[2037],{"type":399,"value":654},{"type":393,"tag":483,"props":2039,"children":2040},{"class":485,"line":130},[2041],{"type":393,"tag":483,"props":2042,"children":2043},{"style":495},[2044],{"type":399,"value":2045},"    json.dump(json_data, f)\n",{"type":393,"tag":483,"props":2047,"children":2048},{"class":485,"line":139},[2049],{"type":393,"tag":483,"props":2050,"children":2051},{"emptyLinePlaceholder":12},[2052],{"type":399,"value":516},{"type":393,"tag":483,"props":2054,"children":2055},{"class":485,"line":148},[2056],{"type":393,"tag":483,"props":2057,"children":2058},{"style":522},[2059],{"type":399,"value":2060},"# Load JSON file\n",{"type":393,"tag":483,"props":2062,"children":2063},{"class":485,"line":159},[2064,2068,2072,2077,2081],{"type":393,"tag":483,"props":2065,"children":2066},{"style":495},[2067],{"type":399,"value":685},{"type":393,"tag":483,"props":2069,"children":2070},{"style":489},[2071],{"type":399,"value":561},{"type":393,"tag":483,"props":2073,"children":2074},{"style":495},[2075],{"type":399,"value":2076}," pd.read_json(",{"type":393,"tag":483,"props":2078,"children":2079},{"style":564},[2080],{"type":399,"value":2017},{"type":393,"tag":483,"props":2082,"children":2083},{"style":495},[2084],{"type":399,"value":703},{"type":393,"tag":483,"props":2086,"children":2087},{"class":485,"line":168},[2088,2092,2096,2101],{"type":393,"tag":483,"props":2089,"children":2090},{"style":617},[2091],{"type":399,"value":711},{"type":393,"tag":483,"props":2093,"children":2094},{"style":495},[2095],{"type":399,"value":625},{"type":393,"tag":483,"props":2097,"children":2098},{"style":564},[2099],{"type":399,"value":2100},"\"Loaded JSON data:\"",{"type":393,"tag":483,"props":2102,"children":2103},{"style":495},[2104],{"type":399,"value":703},{"type":393,"tag":483,"props":2106,"children":2107},{"class":485,"line":177},[2108,2112],{"type":393,"tag":483,"props":2109,"children":2110},{"style":617},[2111],{"type":399,"value":711},{"type":393,"tag":483,"props":2113,"children":2114},{"style":495},[2115],{"type":399,"value":736},{"type":393,"tag":456,"props":2117,"children":2119},{"id":2118},"common-loading-options",[2120],{"type":399,"value":2121},"🔧 Common Loading Options",{"type":393,"tag":402,"props":2123,"children":2124},{},[2125],{"type":399,"value":2126},"Here are the most useful parameters for file loading:",{"type":393,"tag":783,"props":2128,"children":2130},{"id":2129},"csv-options",[2131],{"type":399,"value":2132},"CSV Options",{"type":393,"tag":468,"props":2134,"children":2135},{},[2136],{"type":393,"tag":472,"props":2137,"children":2139},{"className":474,"code":2138,"language":476,"meta":6,"style":6},"import pandas as pd\n\n# Common CSV parameters\nprint(\"CSV loading options:\")\nprint()\n\n# Basic with common options\nsample_data = \"\"\"Name,Age,Salary,Department\nAlice,25,50000,Sales\nBob,30,,Engineering\nCharlie,35,70000,Marketing\"\"\"\n\nwith open('sample_options.csv', 'w') as f:\n    f.write(sample_data)\n\n# Load with options\ndf = pd.read_csv('sample_options.csv', \n                 na_values=['', 'N/A'],  # What counts as missing\n                 dtype={'Age': int})     # Force Age to be integer\n\nprint(\"Data with options:\")\nprint(df)\nprint()\nprint(\"Data types:\")\nprint(df.dtypes)\n",[2140],{"type":393,"tag":479,"props":2141,"children":2142},{"__ignoreMap":6},[2143,2162,2169,2177,2197,2209,2216,2224,2240,2248,2256,2264,2271,2311,2318,2325,2333,2357,2398,2438,2445,2465,2476,2487,2507],{"type":393,"tag":483,"props":2144,"children":2145},{"class":485,"line":11},[2146,2150,2154,2158],{"type":393,"tag":483,"props":2147,"children":2148},{"style":489},[2149],{"type":399,"value":492},{"type":393,"tag":483,"props":2151,"children":2152},{"style":495},[2153],{"type":399,"value":498},{"type":393,"tag":483,"props":2155,"children":2156},{"style":489},[2157],{"type":399,"value":503},{"type":393,"tag":483,"props":2159,"children":2160},{"style":495},[2161],{"type":399,"value":508},{"type":393,"tag":483,"props":2163,"children":2164},{"class":485,"line":27},[2165],{"type":393,"tag":483,"props":2166,"children":2167},{"emptyLinePlaceholder":12},[2168],{"type":399,"value":516},{"type":393,"tag":483,"props":2170,"children":2171},{"class":485,"line":36},[2172],{"type":393,"tag":483,"props":2173,"children":2174},{"style":522},[2175],{"type":399,"value":2176},"# Common CSV parameters\n",{"type":393,"tag":483,"props":2178,"children":2179},{"class":485,"line":45},[2180,2184,2188,2193],{"type":393,"tag":483,"props":2181,"children":2182},{"style":617},[2183],{"type":399,"value":711},{"type":393,"tag":483,"props":2185,"children":2186},{"style":495},[2187],{"type":399,"value":625},{"type":393,"tag":483,"props":2189,"children":2190},{"style":564},[2191],{"type":399,"value":2192},"\"CSV loading options:\"",{"type":393,"tag":483,"props":2194,"children":2195},{"style":495},[2196],{"type":399,"value":703},{"type":393,"tag":483,"props":2198,"children":2199},{"class":485,"line":54},[2200,2204],{"type":393,"tag":483,"props":2201,"children":2202},{"style":617},[2203],{"type":399,"value":711},{"type":393,"tag":483,"props":2205,"children":2206},{"style":495},[2207],{"type":399,"value":2208},"()\n",{"type":393,"tag":483,"props":2210,"children":2211},{"class":485,"line":63},[2212],{"type":393,"tag":483,"props":2213,"children":2214},{"emptyLinePlaceholder":12},[2215],{"type":399,"value":516},{"type":393,"tag":483,"props":2217,"children":2218},{"class":485,"line":72},[2219],{"type":393,"tag":483,"props":2220,"children":2221},{"style":522},[2222],{"type":399,"value":2223},"# Basic with common options\n",{"type":393,"tag":483,"props":2225,"children":2226},{"class":485,"line":83},[2227,2231,2235],{"type":393,"tag":483,"props":2228,"children":2229},{"style":495},[2230],{"type":399,"value":845},{"type":393,"tag":483,"props":2232,"children":2233},{"style":489},[2234],{"type":399,"value":561},{"type":393,"tag":483,"props":2236,"children":2237},{"style":564},[2238],{"type":399,"value":2239}," \"\"\"Name,Age,Salary,Department\n",{"type":393,"tag":483,"props":2241,"children":2242},{"class":485,"line":92},[2243],{"type":393,"tag":483,"props":2244,"children":2245},{"style":564},[2246],{"type":399,"value":2247},"Alice,25,50000,Sales\n",{"type":393,"tag":483,"props":2249,"children":2250},{"class":485,"line":101},[2251],{"type":393,"tag":483,"props":2252,"children":2253},{"style":564},[2254],{"type":399,"value":2255},"Bob,30,,Engineering\n",{"type":393,"tag":483,"props":2257,"children":2258},{"class":485,"line":110},[2259],{"type":393,"tag":483,"props":2260,"children":2261},{"style":564},[2262],{"type":399,"value":2263},"Charlie,35,70000,Marketing\"\"\"\n",{"type":393,"tag":483,"props":2265,"children":2266},{"class":485,"line":121},[2267],{"type":393,"tag":483,"props":2268,"children":2269},{"emptyLinePlaceholder":12},[2270],{"type":399,"value":516},{"type":393,"tag":483,"props":2272,"children":2273},{"class":485,"line":130},[2274,2278,2282,2286,2291,2295,2299,2303,2307],{"type":393,"tag":483,"props":2275,"children":2276},{"style":489},[2277],{"type":399,"value":614},{"type":393,"tag":483,"props":2279,"children":2280},{"style":617},[2281],{"type":399,"value":620},{"type":393,"tag":483,"props":2283,"children":2284},{"style":495},[2285],{"type":399,"value":625},{"type":393,"tag":483,"props":2287,"children":2288},{"style":564},[2289],{"type":399,"value":2290},"'sample_options.csv'",{"type":393,"tag":483,"props":2292,"children":2293},{"style":495},[2294],{"type":399,"value":635},{"type":393,"tag":483,"props":2296,"children":2297},{"style":564},[2298],{"type":399,"value":640},{"type":393,"tag":483,"props":2300,"children":2301},{"style":495},[2302],{"type":399,"value":645},{"type":393,"tag":483,"props":2304,"children":2305},{"style":489},[2306],{"type":399,"value":503},{"type":393,"tag":483,"props":2308,"children":2309},{"style":495},[2310],{"type":399,"value":654},{"type":393,"tag":483,"props":2312,"children":2313},{"class":485,"line":139},[2314],{"type":393,"tag":483,"props":2315,"children":2316},{"style":495},[2317],{"type":399,"value":933},{"type":393,"tag":483,"props":2319,"children":2320},{"class":485,"line":148},[2321],{"type":393,"tag":483,"props":2322,"children":2323},{"emptyLinePlaceholder":12},[2324],{"type":399,"value":516},{"type":393,"tag":483,"props":2326,"children":2327},{"class":485,"line":159},[2328],{"type":393,"tag":483,"props":2329,"children":2330},{"style":522},[2331],{"type":399,"value":2332},"# Load with options\n",{"type":393,"tag":483,"props":2334,"children":2335},{"class":485,"line":168},[2336,2340,2344,2348,2352],{"type":393,"tag":483,"props":2337,"children":2338},{"style":495},[2339],{"type":399,"value":685},{"type":393,"tag":483,"props":2341,"children":2342},{"style":489},[2343],{"type":399,"value":561},{"type":393,"tag":483,"props":2345,"children":2346},{"style":495},[2347],{"type":399,"value":694},{"type":393,"tag":483,"props":2349,"children":2350},{"style":564},[2351],{"type":399,"value":2290},{"type":393,"tag":483,"props":2353,"children":2354},{"style":495},[2355],{"type":399,"value":2356},", \n",{"type":393,"tag":483,"props":2358,"children":2359},{"class":485,"line":177},[2360,2365,2369,2374,2379,2383,2388,2393],{"type":393,"tag":483,"props":2361,"children":2362},{"style":974},[2363],{"type":399,"value":2364},"                 na_values",{"type":393,"tag":483,"props":2366,"children":2367},{"style":489},[2368],{"type":399,"value":561},{"type":393,"tag":483,"props":2370,"children":2371},{"style":495},[2372],{"type":399,"value":2373},"[",{"type":393,"tag":483,"props":2375,"children":2376},{"style":564},[2377],{"type":399,"value":2378},"''",{"type":393,"tag":483,"props":2380,"children":2381},{"style":495},[2382],{"type":399,"value":635},{"type":393,"tag":483,"props":2384,"children":2385},{"style":564},[2386],{"type":399,"value":2387},"'N/A'",{"type":393,"tag":483,"props":2389,"children":2390},{"style":495},[2391],{"type":399,"value":2392},"],  ",{"type":393,"tag":483,"props":2394,"children":2395},{"style":522},[2396],{"type":399,"value":2397},"# What counts as missing\n",{"type":393,"tag":483,"props":2399,"children":2400},{"class":485,"line":186},[2401,2406,2410,2414,2419,2423,2428,2433],{"type":393,"tag":483,"props":2402,"children":2403},{"style":974},[2404],{"type":399,"value":2405},"                 dtype",{"type":393,"tag":483,"props":2407,"children":2408},{"style":489},[2409],{"type":399,"value":561},{"type":393,"tag":483,"props":2411,"children":2412},{"style":495},[2413],{"type":399,"value":762},{"type":393,"tag":483,"props":2415,"children":2416},{"style":564},[2417],{"type":399,"value":2418},"'Age'",{"type":393,"tag":483,"props":2420,"children":2421},{"style":495},[2422],{"type":399,"value":1814},{"type":393,"tag":483,"props":2424,"children":2425},{"style":617},[2426],{"type":399,"value":2427},"int",{"type":393,"tag":483,"props":2429,"children":2430},{"style":495},[2431],{"type":399,"value":2432},"})     ",{"type":393,"tag":483,"props":2434,"children":2435},{"style":522},[2436],{"type":399,"value":2437},"# Force Age to be integer\n",{"type":393,"tag":483,"props":2439,"children":2440},{"class":485,"line":197},[2441],{"type":393,"tag":483,"props":2442,"children":2443},{"emptyLinePlaceholder":12},[2444],{"type":399,"value":516},{"type":393,"tag":483,"props":2446,"children":2447},{"class":485,"line":206},[2448,2452,2456,2461],{"type":393,"tag":483,"props":2449,"children":2450},{"style":617},[2451],{"type":399,"value":711},{"type":393,"tag":483,"props":2453,"children":2454},{"style":495},[2455],{"type":399,"value":625},{"type":393,"tag":483,"props":2457,"children":2458},{"style":564},[2459],{"type":399,"value":2460},"\"Data with options:\"",{"type":393,"tag":483,"props":2462,"children":2463},{"style":495},[2464],{"type":399,"value":703},{"type":393,"tag":483,"props":2466,"children":2467},{"class":485,"line":215},[2468,2472],{"type":393,"tag":483,"props":2469,"children":2470},{"style":617},[2471],{"type":399,"value":711},{"type":393,"tag":483,"props":2473,"children":2474},{"style":495},[2475],{"type":399,"value":736},{"type":393,"tag":483,"props":2477,"children":2478},{"class":485,"line":224},[2479,2483],{"type":393,"tag":483,"props":2480,"children":2481},{"style":617},[2482],{"type":399,"value":711},{"type":393,"tag":483,"props":2484,"children":2485},{"style":495},[2486],{"type":399,"value":2208},{"type":393,"tag":483,"props":2488,"children":2489},{"class":485,"line":233},[2490,2494,2498,2503],{"type":393,"tag":483,"props":2491,"children":2492},{"style":617},[2493],{"type":399,"value":711},{"type":393,"tag":483,"props":2495,"children":2496},{"style":495},[2497],{"type":399,"value":625},{"type":393,"tag":483,"props":2499,"children":2500},{"style":564},[2501],{"type":399,"value":2502},"\"Data types:\"",{"type":393,"tag":483,"props":2504,"children":2505},{"style":495},[2506],{"type":399,"value":703},{"type":393,"tag":483,"props":2508,"children":2509},{"class":485,"line":244},[2510,2514],{"type":393,"tag":483,"props":2511,"children":2512},{"style":617},[2513],{"type":399,"value":711},{"type":393,"tag":483,"props":2515,"children":2516},{"style":495},[2517],{"type":399,"value":2518},"(df.dtypes)\n",{"type":393,"tag":783,"props":2520,"children":2522},{"id":2521},"excel-options",[2523],{"type":399,"value":2524},"Excel Options",{"type":393,"tag":408,"props":2526,"children":2528},{"emoji":1393,"title":2527,"type":412},"Common Excel Loading Parameters",[2529,2537,2560,2568,2604,2612],{"type":393,"tag":402,"props":2530,"children":2531},{},[2532],{"type":393,"tag":418,"props":2533,"children":2534},{},[2535],{"type":399,"value":2536},"Sheet Selection:",{"type":393,"tag":1405,"props":2538,"children":2539},{},[2540,2550],{"type":393,"tag":1409,"props":2541,"children":2542},{},[2543,2549],{"type":393,"tag":479,"props":2544,"children":2546},{"className":2545},[],[2547],{"type":399,"value":2548},"sheet_name='Data'",{"type":399,"value":1419},{"type":393,"tag":1409,"props":2551,"children":2552},{},[2553,2558],{"type":393,"tag":479,"props":2554,"children":2556},{"className":2555},[],[2557],{"type":399,"value":1428},{"type":399,"value":2559},": Load first sheet (default)",{"type":393,"tag":402,"props":2561,"children":2562},{},[2563],{"type":393,"tag":418,"props":2564,"children":2565},{},[2566],{"type":399,"value":2567},"Row/Column Control:",{"type":393,"tag":1405,"props":2569,"children":2570},{},[2571,2582,2593],{"type":393,"tag":1409,"props":2572,"children":2573},{},[2574,2580],{"type":393,"tag":479,"props":2575,"children":2577},{"className":2576},[],[2578],{"type":399,"value":2579},"header=1",{"type":399,"value":2581},": Use row 2 as column headers",{"type":393,"tag":1409,"props":2583,"children":2584},{},[2585,2591],{"type":393,"tag":479,"props":2586,"children":2588},{"className":2587},[],[2589],{"type":399,"value":2590},"usecols='A:D'",{"type":399,"value":2592},": Only load columns A through D",{"type":393,"tag":1409,"props":2594,"children":2595},{},[2596,2602],{"type":393,"tag":479,"props":2597,"children":2599},{"className":2598},[],[2600],{"type":399,"value":2601},"nrows=100",{"type":399,"value":2603},": Only load first 100 rows",{"type":393,"tag":402,"props":2605,"children":2606},{},[2607],{"type":393,"tag":418,"props":2608,"children":2609},{},[2610],{"type":399,"value":2611},"Use Cases:",{"type":393,"tag":1405,"props":2613,"children":2614},{},[2615,2620,2625],{"type":393,"tag":1409,"props":2616,"children":2617},{},[2618],{"type":399,"value":2619},"Skip header rows that contain titles",{"type":393,"tag":1409,"props":2621,"children":2622},{},[2623],{"type":399,"value":2624},"Load only needed columns for better performance",{"type":393,"tag":1409,"props":2626,"children":2627},{},[2628],{"type":399,"value":2629},"Limit rows when testing with large files",{"type":393,"tag":468,"props":2631,"children":2632},{},[2633],{"type":393,"tag":472,"props":2634,"children":2636},{"className":474,"code":2635,"language":476,"meta":6,"style":6},"import pandas as pd\n\n# Example Excel loading with options\n# df = pd.read_excel('sales.xlsx', sheet_name='Q1_Data')\n# df = pd.read_excel('report.xlsx', header=1, usecols='A:F')\n# df = pd.read_excel('large_file.xlsx', nrows=1000)  # Test with first 1000 rows\n\n# For demonstration (these would work with real files)\nsample_excel_options = {\n    'sheet_name': 'Data',\n    'header': 0,\n    'usecols': 'A:D',\n    'nrows': 100\n}\nprint(f\"Excel options: {sample_excel_options}\")\n",[2637],{"type":393,"tag":479,"props":2638,"children":2639},{"__ignoreMap":6},[2640,2659,2666,2674,2682,2690,2698,2705,2713,2730,2752,2772,2793,2810,2817],{"type":393,"tag":483,"props":2641,"children":2642},{"class":485,"line":11},[2643,2647,2651,2655],{"type":393,"tag":483,"props":2644,"children":2645},{"style":489},[2646],{"type":399,"value":492},{"type":393,"tag":483,"props":2648,"children":2649},{"style":495},[2650],{"type":399,"value":498},{"type":393,"tag":483,"props":2652,"children":2653},{"style":489},[2654],{"type":399,"value":503},{"type":393,"tag":483,"props":2656,"children":2657},{"style":495},[2658],{"type":399,"value":508},{"type":393,"tag":483,"props":2660,"children":2661},{"class":485,"line":27},[2662],{"type":393,"tag":483,"props":2663,"children":2664},{"emptyLinePlaceholder":12},[2665],{"type":399,"value":516},{"type":393,"tag":483,"props":2667,"children":2668},{"class":485,"line":36},[2669],{"type":393,"tag":483,"props":2670,"children":2671},{"style":522},[2672],{"type":399,"value":2673},"# Example Excel loading with options\n",{"type":393,"tag":483,"props":2675,"children":2676},{"class":485,"line":45},[2677],{"type":393,"tag":483,"props":2678,"children":2679},{"style":522},[2680],{"type":399,"value":2681},"# df = pd.read_excel('sales.xlsx', sheet_name='Q1_Data')\n",{"type":393,"tag":483,"props":2683,"children":2684},{"class":485,"line":54},[2685],{"type":393,"tag":483,"props":2686,"children":2687},{"style":522},[2688],{"type":399,"value":2689},"# df = pd.read_excel('report.xlsx', header=1, usecols='A:F')\n",{"type":393,"tag":483,"props":2691,"children":2692},{"class":485,"line":63},[2693],{"type":393,"tag":483,"props":2694,"children":2695},{"style":522},[2696],{"type":399,"value":2697},"# df = pd.read_excel('large_file.xlsx', nrows=1000)  # Test with first 1000 rows\n",{"type":393,"tag":483,"props":2699,"children":2700},{"class":485,"line":72},[2701],{"type":393,"tag":483,"props":2702,"children":2703},{"emptyLinePlaceholder":12},[2704],{"type":399,"value":516},{"type":393,"tag":483,"props":2706,"children":2707},{"class":485,"line":83},[2708],{"type":393,"tag":483,"props":2709,"children":2710},{"style":522},[2711],{"type":399,"value":2712},"# For demonstration (these would work with real files)\n",{"type":393,"tag":483,"props":2714,"children":2715},{"class":485,"line":92},[2716,2721,2725],{"type":393,"tag":483,"props":2717,"children":2718},{"style":495},[2719],{"type":399,"value":2720},"sample_excel_options ",{"type":393,"tag":483,"props":2722,"children":2723},{"style":489},[2724],{"type":399,"value":561},{"type":393,"tag":483,"props":2726,"children":2727},{"style":495},[2728],{"type":399,"value":2729}," {\n",{"type":393,"tag":483,"props":2731,"children":2732},{"class":485,"line":101},[2733,2738,2742,2747],{"type":393,"tag":483,"props":2734,"children":2735},{"style":564},[2736],{"type":399,"value":2737},"    'sheet_name'",{"type":393,"tag":483,"props":2739,"children":2740},{"style":495},[2741],{"type":399,"value":1814},{"type":393,"tag":483,"props":2743,"children":2744},{"style":564},[2745],{"type":399,"value":2746},"'Data'",{"type":393,"tag":483,"props":2748,"children":2749},{"style":495},[2750],{"type":399,"value":2751},",\n",{"type":393,"tag":483,"props":2753,"children":2754},{"class":485,"line":110},[2755,2760,2764,2768],{"type":393,"tag":483,"props":2756,"children":2757},{"style":564},[2758],{"type":399,"value":2759},"    'header'",{"type":393,"tag":483,"props":2761,"children":2762},{"style":495},[2763],{"type":399,"value":1814},{"type":393,"tag":483,"props":2765,"children":2766},{"style":617},[2767],{"type":399,"value":1656},{"type":393,"tag":483,"props":2769,"children":2770},{"style":495},[2771],{"type":399,"value":2751},{"type":393,"tag":483,"props":2773,"children":2774},{"class":485,"line":121},[2775,2780,2784,2789],{"type":393,"tag":483,"props":2776,"children":2777},{"style":564},[2778],{"type":399,"value":2779},"    'usecols'",{"type":393,"tag":483,"props":2781,"children":2782},{"style":495},[2783],{"type":399,"value":1814},{"type":393,"tag":483,"props":2785,"children":2786},{"style":564},[2787],{"type":399,"value":2788},"'A:D'",{"type":393,"tag":483,"props":2790,"children":2791},{"style":495},[2792],{"type":399,"value":2751},{"type":393,"tag":483,"props":2794,"children":2795},{"class":485,"line":130},[2796,2801,2805],{"type":393,"tag":483,"props":2797,"children":2798},{"style":564},[2799],{"type":399,"value":2800},"    'nrows'",{"type":393,"tag":483,"props":2802,"children":2803},{"style":495},[2804],{"type":399,"value":1814},{"type":393,"tag":483,"props":2806,"children":2807},{"style":617},[2808],{"type":399,"value":2809},"100\n",{"type":393,"tag":483,"props":2811,"children":2812},{"class":485,"line":139},[2813],{"type":393,"tag":483,"props":2814,"children":2815},{"style":495},[2816],{"type":399,"value":1975},{"type":393,"tag":483,"props":2818,"children":2819},{"class":485,"line":148},[2820,2824,2828,2832,2837,2841,2846,2850,2854],{"type":393,"tag":483,"props":2821,"children":2822},{"style":617},[2823],{"type":399,"value":711},{"type":393,"tag":483,"props":2825,"children":2826},{"style":495},[2827],{"type":399,"value":625},{"type":393,"tag":483,"props":2829,"children":2830},{"style":489},[2831],{"type":399,"value":752},{"type":393,"tag":483,"props":2833,"children":2834},{"style":564},[2835],{"type":399,"value":2836},"\"Excel options: ",{"type":393,"tag":483,"props":2838,"children":2839},{"style":617},[2840],{"type":399,"value":762},{"type":393,"tag":483,"props":2842,"children":2843},{"style":495},[2844],{"type":399,"value":2845},"sample_excel_options",{"type":393,"tag":483,"props":2847,"children":2848},{"style":617},[2849],{"type":399,"value":772},{"type":393,"tag":483,"props":2851,"children":2852},{"style":564},[2853],{"type":399,"value":777},{"type":393,"tag":483,"props":2855,"children":2856},{"style":495},[2857],{"type":399,"value":703},{"type":393,"tag":456,"props":2859,"children":2861},{"id":2860},"️-handling-common-problems",[2862],{"type":399,"value":2863},"⚠️ Handling Common Problems",{"type":393,"tag":402,"props":2865,"children":2866},{},[2867],{"type":399,"value":2868},"File loading often has issues. Here's how to handle them:",{"type":393,"tag":468,"props":2870,"children":2871},{},[2872],{"type":393,"tag":472,"props":2873,"children":2875},{"className":474,"code":2874,"language":476,"meta":6,"style":6},"import pandas as pd\n\ndef safe_file_load(filename, file_type='csv'):\n    \"\"\"Safely load a file with error handling\"\"\"\n    try:\n        if file_type == 'csv':\n            df = pd.read_csv(filename)\n        elif file_type == 'excel':\n            df = pd.read_excel(filename)\n        elif file_type == 'json':\n            df = pd.read_json(filename)\n        \n        print(f\"✅ Successfully loaded {filename}\")\n        print(f\"   Shape: {df.shape}\")\n        print(f\"   Columns: {list(df.columns)}\")\n        return df\n        \n    except FileNotFoundError:\n        print(f\"❌ File '{filename}' not found\")\n    except Exception as e:\n        print(f\"❌ Error loading {filename}: {e}\")\n    return None\n\n# Test with our sample file\ndf = safe_file_load('sample.csv', 'csv')\nif df is not None:\n    print(df.head())\n",[2876],{"type":393,"tag":479,"props":2877,"children":2878},{"__ignoreMap":6},[2879,2898,2905,2938,2946,2959,2986,3003,3028,3044,3068,3084,3092,3134,3174,3216,3229,3236,3253,3294,3316,3373,3386,3393,3401,3433,3465],{"type":393,"tag":483,"props":2880,"children":2881},{"class":485,"line":11},[2882,2886,2890,2894],{"type":393,"tag":483,"props":2883,"children":2884},{"style":489},[2885],{"type":399,"value":492},{"type":393,"tag":483,"props":2887,"children":2888},{"style":495},[2889],{"type":399,"value":498},{"type":393,"tag":483,"props":2891,"children":2892},{"style":489},[2893],{"type":399,"value":503},{"type":393,"tag":483,"props":2895,"children":2896},{"style":495},[2897],{"type":399,"value":508},{"type":393,"tag":483,"props":2899,"children":2900},{"class":485,"line":27},[2901],{"type":393,"tag":483,"props":2902,"children":2903},{"emptyLinePlaceholder":12},[2904],{"type":399,"value":516},{"type":393,"tag":483,"props":2906,"children":2907},{"class":485,"line":36},[2908,2913,2919,2924,2928,2933],{"type":393,"tag":483,"props":2909,"children":2910},{"style":489},[2911],{"type":399,"value":2912},"def",{"type":393,"tag":483,"props":2914,"children":2916},{"style":2915},"--shiki-default:#6F42C1;--shiki-app-dark-mode:#B392F0",[2917],{"type":399,"value":2918}," safe_file_load",{"type":393,"tag":483,"props":2920,"children":2921},{"style":495},[2922],{"type":399,"value":2923},"(filename, file_type",{"type":393,"tag":483,"props":2925,"children":2926},{"style":489},[2927],{"type":399,"value":561},{"type":393,"tag":483,"props":2929,"children":2930},{"style":564},[2931],{"type":399,"value":2932},"'csv'",{"type":393,"tag":483,"props":2934,"children":2935},{"style":495},[2936],{"type":399,"value":2937},"):\n",{"type":393,"tag":483,"props":2939,"children":2940},{"class":485,"line":45},[2941],{"type":393,"tag":483,"props":2942,"children":2943},{"style":564},[2944],{"type":399,"value":2945},"    \"\"\"Safely load a file with error handling\"\"\"\n",{"type":393,"tag":483,"props":2947,"children":2948},{"class":485,"line":54},[2949,2954],{"type":393,"tag":483,"props":2950,"children":2951},{"style":489},[2952],{"type":399,"value":2953},"    try",{"type":393,"tag":483,"props":2955,"children":2956},{"style":495},[2957],{"type":399,"value":2958},":\n",{"type":393,"tag":483,"props":2960,"children":2961},{"class":485,"line":63},[2962,2967,2972,2977,2982],{"type":393,"tag":483,"props":2963,"children":2964},{"style":489},[2965],{"type":399,"value":2966},"        if",{"type":393,"tag":483,"props":2968,"children":2969},{"style":495},[2970],{"type":399,"value":2971}," file_type ",{"type":393,"tag":483,"props":2973,"children":2974},{"style":489},[2975],{"type":399,"value":2976},"==",{"type":393,"tag":483,"props":2978,"children":2979},{"style":564},[2980],{"type":399,"value":2981}," 'csv'",{"type":393,"tag":483,"props":2983,"children":2984},{"style":495},[2985],{"type":399,"value":2958},{"type":393,"tag":483,"props":2987,"children":2988},{"class":485,"line":72},[2989,2994,2998],{"type":393,"tag":483,"props":2990,"children":2991},{"style":495},[2992],{"type":399,"value":2993},"            df ",{"type":393,"tag":483,"props":2995,"children":2996},{"style":489},[2997],{"type":399,"value":561},{"type":393,"tag":483,"props":2999,"children":3000},{"style":495},[3001],{"type":399,"value":3002}," pd.read_csv(filename)\n",{"type":393,"tag":483,"props":3004,"children":3005},{"class":485,"line":83},[3006,3011,3015,3019,3024],{"type":393,"tag":483,"props":3007,"children":3008},{"style":489},[3009],{"type":399,"value":3010},"        elif",{"type":393,"tag":483,"props":3012,"children":3013},{"style":495},[3014],{"type":399,"value":2971},{"type":393,"tag":483,"props":3016,"children":3017},{"style":489},[3018],{"type":399,"value":2976},{"type":393,"tag":483,"props":3020,"children":3021},{"style":564},[3022],{"type":399,"value":3023}," 'excel'",{"type":393,"tag":483,"props":3025,"children":3026},{"style":495},[3027],{"type":399,"value":2958},{"type":393,"tag":483,"props":3029,"children":3030},{"class":485,"line":92},[3031,3035,3039],{"type":393,"tag":483,"props":3032,"children":3033},{"style":495},[3034],{"type":399,"value":2993},{"type":393,"tag":483,"props":3036,"children":3037},{"style":489},[3038],{"type":399,"value":561},{"type":393,"tag":483,"props":3040,"children":3041},{"style":495},[3042],{"type":399,"value":3043}," pd.read_excel(filename)\n",{"type":393,"tag":483,"props":3045,"children":3046},{"class":485,"line":101},[3047,3051,3055,3059,3064],{"type":393,"tag":483,"props":3048,"children":3049},{"style":489},[3050],{"type":399,"value":3010},{"type":393,"tag":483,"props":3052,"children":3053},{"style":495},[3054],{"type":399,"value":2971},{"type":393,"tag":483,"props":3056,"children":3057},{"style":489},[3058],{"type":399,"value":2976},{"type":393,"tag":483,"props":3060,"children":3061},{"style":564},[3062],{"type":399,"value":3063}," 'json'",{"type":393,"tag":483,"props":3065,"children":3066},{"style":495},[3067],{"type":399,"value":2958},{"type":393,"tag":483,"props":3069,"children":3070},{"class":485,"line":110},[3071,3075,3079],{"type":393,"tag":483,"props":3072,"children":3073},{"style":495},[3074],{"type":399,"value":2993},{"type":393,"tag":483,"props":3076,"children":3077},{"style":489},[3078],{"type":399,"value":561},{"type":393,"tag":483,"props":3080,"children":3081},{"style":495},[3082],{"type":399,"value":3083}," pd.read_json(filename)\n",{"type":393,"tag":483,"props":3085,"children":3086},{"class":485,"line":121},[3087],{"type":393,"tag":483,"props":3088,"children":3089},{"style":495},[3090],{"type":399,"value":3091},"        \n",{"type":393,"tag":483,"props":3093,"children":3094},{"class":485,"line":130},[3095,3100,3104,3108,3113,3117,3122,3126,3130],{"type":393,"tag":483,"props":3096,"children":3097},{"style":617},[3098],{"type":399,"value":3099},"        print",{"type":393,"tag":483,"props":3101,"children":3102},{"style":495},[3103],{"type":399,"value":625},{"type":393,"tag":483,"props":3105,"children":3106},{"style":489},[3107],{"type":399,"value":752},{"type":393,"tag":483,"props":3109,"children":3110},{"style":564},[3111],{"type":399,"value":3112},"\"✅ Successfully loaded ",{"type":393,"tag":483,"props":3114,"children":3115},{"style":617},[3116],{"type":399,"value":762},{"type":393,"tag":483,"props":3118,"children":3119},{"style":495},[3120],{"type":399,"value":3121},"filename",{"type":393,"tag":483,"props":3123,"children":3124},{"style":617},[3125],{"type":399,"value":772},{"type":393,"tag":483,"props":3127,"children":3128},{"style":564},[3129],{"type":399,"value":777},{"type":393,"tag":483,"props":3131,"children":3132},{"style":495},[3133],{"type":399,"value":703},{"type":393,"tag":483,"props":3135,"children":3136},{"class":485,"line":139},[3137,3141,3145,3149,3154,3158,3162,3166,3170],{"type":393,"tag":483,"props":3138,"children":3139},{"style":617},[3140],{"type":399,"value":3099},{"type":393,"tag":483,"props":3142,"children":3143},{"style":495},[3144],{"type":399,"value":625},{"type":393,"tag":483,"props":3146,"children":3147},{"style":489},[3148],{"type":399,"value":752},{"type":393,"tag":483,"props":3150,"children":3151},{"style":564},[3152],{"type":399,"value":3153},"\"   Shape: ",{"type":393,"tag":483,"props":3155,"children":3156},{"style":617},[3157],{"type":399,"value":762},{"type":393,"tag":483,"props":3159,"children":3160},{"style":495},[3161],{"type":399,"value":767},{"type":393,"tag":483,"props":3163,"children":3164},{"style":617},[3165],{"type":399,"value":772},{"type":393,"tag":483,"props":3167,"children":3168},{"style":564},[3169],{"type":399,"value":777},{"type":393,"tag":483,"props":3171,"children":3172},{"style":495},[3173],{"type":399,"value":703},{"type":393,"tag":483,"props":3175,"children":3176},{"class":485,"line":148},[3177,3181,3185,3189,3194,3199,3204,3208,3212],{"type":393,"tag":483,"props":3178,"children":3179},{"style":617},[3180],{"type":399,"value":3099},{"type":393,"tag":483,"props":3182,"children":3183},{"style":495},[3184],{"type":399,"value":625},{"type":393,"tag":483,"props":3186,"children":3187},{"style":489},[3188],{"type":399,"value":752},{"type":393,"tag":483,"props":3190,"children":3191},{"style":564},[3192],{"type":399,"value":3193},"\"   Columns: ",{"type":393,"tag":483,"props":3195,"children":3196},{"style":617},[3197],{"type":399,"value":3198},"{list",{"type":393,"tag":483,"props":3200,"children":3201},{"style":495},[3202],{"type":399,"value":3203},"(df.columns)",{"type":393,"tag":483,"props":3205,"children":3206},{"style":617},[3207],{"type":399,"value":772},{"type":393,"tag":483,"props":3209,"children":3210},{"style":564},[3211],{"type":399,"value":777},{"type":393,"tag":483,"props":3213,"children":3214},{"style":495},[3215],{"type":399,"value":703},{"type":393,"tag":483,"props":3217,"children":3218},{"class":485,"line":159},[3219,3224],{"type":393,"tag":483,"props":3220,"children":3221},{"style":489},[3222],{"type":399,"value":3223},"        return",{"type":393,"tag":483,"props":3225,"children":3226},{"style":495},[3227],{"type":399,"value":3228}," df\n",{"type":393,"tag":483,"props":3230,"children":3231},{"class":485,"line":168},[3232],{"type":393,"tag":483,"props":3233,"children":3234},{"style":495},[3235],{"type":399,"value":3091},{"type":393,"tag":483,"props":3237,"children":3238},{"class":485,"line":177},[3239,3244,3249],{"type":393,"tag":483,"props":3240,"children":3241},{"style":489},[3242],{"type":399,"value":3243},"    except",{"type":393,"tag":483,"props":3245,"children":3246},{"style":617},[3247],{"type":399,"value":3248}," FileNotFoundError",{"type":393,"tag":483,"props":3250,"children":3251},{"style":495},[3252],{"type":399,"value":2958},{"type":393,"tag":483,"props":3254,"children":3255},{"class":485,"line":186},[3256,3260,3264,3268,3273,3277,3281,3285,3290],{"type":393,"tag":483,"props":3257,"children":3258},{"style":617},[3259],{"type":399,"value":3099},{"type":393,"tag":483,"props":3261,"children":3262},{"style":495},[3263],{"type":399,"value":625},{"type":393,"tag":483,"props":3265,"children":3266},{"style":489},[3267],{"type":399,"value":752},{"type":393,"tag":483,"props":3269,"children":3270},{"style":564},[3271],{"type":399,"value":3272},"\"❌ File '",{"type":393,"tag":483,"props":3274,"children":3275},{"style":617},[3276],{"type":399,"value":762},{"type":393,"tag":483,"props":3278,"children":3279},{"style":495},[3280],{"type":399,"value":3121},{"type":393,"tag":483,"props":3282,"children":3283},{"style":617},[3284],{"type":399,"value":772},{"type":393,"tag":483,"props":3286,"children":3287},{"style":564},[3288],{"type":399,"value":3289},"' not found\"",{"type":393,"tag":483,"props":3291,"children":3292},{"style":495},[3293],{"type":399,"value":703},{"type":393,"tag":483,"props":3295,"children":3296},{"class":485,"line":197},[3297,3301,3306,3311],{"type":393,"tag":483,"props":3298,"children":3299},{"style":489},[3300],{"type":399,"value":3243},{"type":393,"tag":483,"props":3302,"children":3303},{"style":617},[3304],{"type":399,"value":3305}," Exception",{"type":393,"tag":483,"props":3307,"children":3308},{"style":489},[3309],{"type":399,"value":3310}," as",{"type":393,"tag":483,"props":3312,"children":3313},{"style":495},[3314],{"type":399,"value":3315}," e:\n",{"type":393,"tag":483,"props":3317,"children":3318},{"class":485,"line":206},[3319,3323,3327,3331,3336,3340,3344,3348,3352,3356,3361,3365,3369],{"type":393,"tag":483,"props":3320,"children":3321},{"style":617},[3322],{"type":399,"value":3099},{"type":393,"tag":483,"props":3324,"children":3325},{"style":495},[3326],{"type":399,"value":625},{"type":393,"tag":483,"props":3328,"children":3329},{"style":489},[3330],{"type":399,"value":752},{"type":393,"tag":483,"props":3332,"children":3333},{"style":564},[3334],{"type":399,"value":3335},"\"❌ Error loading ",{"type":393,"tag":483,"props":3337,"children":3338},{"style":617},[3339],{"type":399,"value":762},{"type":393,"tag":483,"props":3341,"children":3342},{"style":495},[3343],{"type":399,"value":3121},{"type":393,"tag":483,"props":3345,"children":3346},{"style":617},[3347],{"type":399,"value":772},{"type":393,"tag":483,"props":3349,"children":3350},{"style":564},[3351],{"type":399,"value":1814},{"type":393,"tag":483,"props":3353,"children":3354},{"style":617},[3355],{"type":399,"value":762},{"type":393,"tag":483,"props":3357,"children":3358},{"style":495},[3359],{"type":399,"value":3360},"e",{"type":393,"tag":483,"props":3362,"children":3363},{"style":617},[3364],{"type":399,"value":772},{"type":393,"tag":483,"props":3366,"children":3367},{"style":564},[3368],{"type":399,"value":777},{"type":393,"tag":483,"props":3370,"children":3371},{"style":495},[3372],{"type":399,"value":703},{"type":393,"tag":483,"props":3374,"children":3375},{"class":485,"line":215},[3376,3381],{"type":393,"tag":483,"props":3377,"children":3378},{"style":489},[3379],{"type":399,"value":3380},"    return",{"type":393,"tag":483,"props":3382,"children":3383},{"style":617},[3384],{"type":399,"value":3385}," None\n",{"type":393,"tag":483,"props":3387,"children":3388},{"class":485,"line":224},[3389],{"type":393,"tag":483,"props":3390,"children":3391},{"emptyLinePlaceholder":12},[3392],{"type":399,"value":516},{"type":393,"tag":483,"props":3394,"children":3395},{"class":485,"line":233},[3396],{"type":393,"tag":483,"props":3397,"children":3398},{"style":522},[3399],{"type":399,"value":3400},"# Test with our sample file\n",{"type":393,"tag":483,"props":3402,"children":3403},{"class":485,"line":244},[3404,3408,3412,3417,3421,3425,3429],{"type":393,"tag":483,"props":3405,"children":3406},{"style":495},[3407],{"type":399,"value":685},{"type":393,"tag":483,"props":3409,"children":3410},{"style":489},[3411],{"type":399,"value":561},{"type":393,"tag":483,"props":3413,"children":3414},{"style":495},[3415],{"type":399,"value":3416}," safe_file_load(",{"type":393,"tag":483,"props":3418,"children":3419},{"style":564},[3420],{"type":399,"value":630},{"type":393,"tag":483,"props":3422,"children":3423},{"style":495},[3424],{"type":399,"value":635},{"type":393,"tag":483,"props":3426,"children":3427},{"style":564},[3428],{"type":399,"value":2932},{"type":393,"tag":483,"props":3430,"children":3431},{"style":495},[3432],{"type":399,"value":703},{"type":393,"tag":483,"props":3434,"children":3435},{"class":485,"line":253},[3436,3441,3446,3451,3456,3461],{"type":393,"tag":483,"props":3437,"children":3438},{"style":489},[3439],{"type":399,"value":3440},"if",{"type":393,"tag":483,"props":3442,"children":3443},{"style":495},[3444],{"type":399,"value":3445}," df ",{"type":393,"tag":483,"props":3447,"children":3448},{"style":489},[3449],{"type":399,"value":3450},"is",{"type":393,"tag":483,"props":3452,"children":3453},{"style":489},[3454],{"type":399,"value":3455}," not",{"type":393,"tag":483,"props":3457,"children":3458},{"style":617},[3459],{"type":399,"value":3460}," None",{"type":393,"tag":483,"props":3462,"children":3463},{"style":495},[3464],{"type":399,"value":2958},{"type":393,"tag":483,"props":3466,"children":3467},{"class":485,"line":262},[3468,3473],{"type":393,"tag":483,"props":3469,"children":3470},{"style":617},[3471],{"type":399,"value":3472},"    print",{"type":393,"tag":483,"props":3474,"children":3475},{"style":495},[3476],{"type":399,"value":3477},"(df.head())\n",{"type":393,"tag":456,"props":3479,"children":3481},{"id":3480},"file-loading-checklist",[3482],{"type":399,"value":3483},"📋 File Loading Checklist",{"type":393,"tag":3485,"props":3486,"children":3487},"table",{},[3488,3512],{"type":393,"tag":3489,"props":3490,"children":3491},"thead",{},[3492],{"type":393,"tag":3493,"props":3494,"children":3495},"tr",{},[3496,3502,3507],{"type":393,"tag":3497,"props":3498,"children":3499},"th",{},[3500],{"type":399,"value":3501},"Step",{"type":393,"tag":3497,"props":3503,"children":3504},{},[3505],{"type":399,"value":3506},"What to Check",{"type":393,"tag":3497,"props":3508,"children":3509},{},[3510],{"type":399,"value":3511},"Command",{"type":393,"tag":3513,"props":3514,"children":3515},"tbody",{},[3516,3544,3567,3601,3628],{"type":393,"tag":3493,"props":3517,"children":3518},{},[3519,3530,3535],{"type":393,"tag":3520,"props":3521,"children":3522},"td",{},[3523,3525],{"type":399,"value":3524},"1. ",{"type":393,"tag":418,"props":3526,"children":3527},{},[3528],{"type":399,"value":3529},"File exists?",{"type":393,"tag":3520,"props":3531,"children":3532},{},[3533],{"type":399,"value":3534},"Is the file path correct?",{"type":393,"tag":3520,"props":3536,"children":3537},{},[3538],{"type":393,"tag":479,"props":3539,"children":3541},{"className":3540},[],[3542],{"type":399,"value":3543},"os.path.exists('file.csv')",{"type":393,"tag":3493,"props":3545,"children":3546},{},[3547,3557,3562],{"type":393,"tag":3520,"props":3548,"children":3549},{},[3550,3552],{"type":399,"value":3551},"2. ",{"type":393,"tag":418,"props":3553,"children":3554},{},[3555],{"type":399,"value":3556},"Right method?",{"type":393,"tag":3520,"props":3558,"children":3559},{},[3560],{"type":399,"value":3561},"CSV→read_csv, Excel→read_excel",{"type":393,"tag":3520,"props":3563,"children":3564},{},[3565],{"type":399,"value":3566},"Match file extension",{"type":393,"tag":3493,"props":3568,"children":3569},{},[3570,3580,3585],{"type":393,"tag":3520,"props":3571,"children":3572},{},[3573,3575],{"type":399,"value":3574},"3. ",{"type":393,"tag":418,"props":3576,"children":3577},{},[3578],{"type":399,"value":3579},"Loaded correctly?",{"type":393,"tag":3520,"props":3581,"children":3582},{},[3583],{"type":399,"value":3584},"Check shape and columns",{"type":393,"tag":3520,"props":3586,"children":3587},{},[3588,3594,3595],{"type":393,"tag":479,"props":3589,"children":3591},{"className":3590},[],[3592],{"type":399,"value":3593},".shape",{"type":399,"value":635},{"type":393,"tag":479,"props":3596,"children":3598},{"className":3597},[],[3599],{"type":399,"value":3600},".columns",{"type":393,"tag":3493,"props":3602,"children":3603},{},[3604,3614,3619],{"type":393,"tag":3520,"props":3605,"children":3606},{},[3607,3609],{"type":399,"value":3608},"4. ",{"type":393,"tag":418,"props":3610,"children":3611},{},[3612],{"type":399,"value":3613},"Data looks right?",{"type":393,"tag":3520,"props":3615,"children":3616},{},[3617],{"type":399,"value":3618},"Inspect first few rows",{"type":393,"tag":3520,"props":3620,"children":3621},{},[3622],{"type":393,"tag":479,"props":3623,"children":3625},{"className":3624},[],[3626],{"type":399,"value":3627},".head()",{"type":393,"tag":3493,"props":3629,"children":3630},{},[3631,3641,3646],{"type":393,"tag":3520,"props":3632,"children":3633},{},[3634,3636],{"type":399,"value":3635},"5. ",{"type":393,"tag":418,"props":3637,"children":3638},{},[3639],{"type":399,"value":3640},"Missing values?",{"type":393,"tag":3520,"props":3642,"children":3643},{},[3644],{"type":399,"value":3645},"Check for NaN values",{"type":393,"tag":3520,"props":3647,"children":3648},{},[3649],{"type":393,"tag":479,"props":3650,"children":3652},{"className":3651},[],[3653],{"type":399,"value":3654},".isnull().sum()",{"type":393,"tag":456,"props":3656,"children":3658},{"id":3657},"quick-file-loading-reference",[3659],{"type":399,"value":3660},"🎯 Quick File Loading Reference",{"type":393,"tag":408,"props":3662,"children":3666},{"emoji":3663,"title":3664,"type":3665},"📚","File Loading Cheat Sheet","success",[3667,3675,3795,3803,3918,3926,4003,4011],{"type":393,"tag":402,"props":3668,"children":3669},{},[3670],{"type":393,"tag":418,"props":3671,"children":3672},{},[3673],{"type":399,"value":3674},"CSV Files:",{"type":393,"tag":472,"props":3676,"children":3678},{"className":474,"code":3677,"language":476,"meta":6,"style":6},"df = pd.read_csv('file.csv')\ndf = pd.read_csv('file.csv', sep=';')  # Different separator\ndf = pd.read_csv('file.csv', header=0)  # First row as headers\n",[3679],{"type":393,"tag":479,"props":3680,"children":3681},{"__ignoreMap":6},[3682,3706,3750],{"type":393,"tag":483,"props":3683,"children":3684},{"class":485,"line":11},[3685,3689,3693,3697,3702],{"type":393,"tag":483,"props":3686,"children":3687},{"style":495},[3688],{"type":399,"value":685},{"type":393,"tag":483,"props":3690,"children":3691},{"style":489},[3692],{"type":399,"value":561},{"type":393,"tag":483,"props":3694,"children":3695},{"style":495},[3696],{"type":399,"value":694},{"type":393,"tag":483,"props":3698,"children":3699},{"style":564},[3700],{"type":399,"value":3701},"'file.csv'",{"type":393,"tag":483,"props":3703,"children":3704},{"style":495},[3705],{"type":399,"value":703},{"type":393,"tag":483,"props":3707,"children":3708},{"class":485,"line":27},[3709,3713,3717,3721,3725,3729,3733,3737,3741,3745],{"type":393,"tag":483,"props":3710,"children":3711},{"style":495},[3712],{"type":399,"value":685},{"type":393,"tag":483,"props":3714,"children":3715},{"style":489},[3716],{"type":399,"value":561},{"type":393,"tag":483,"props":3718,"children":3719},{"style":495},[3720],{"type":399,"value":694},{"type":393,"tag":483,"props":3722,"children":3723},{"style":564},[3724],{"type":399,"value":3701},{"type":393,"tag":483,"props":3726,"children":3727},{"style":495},[3728],{"type":399,"value":635},{"type":393,"tag":483,"props":3730,"children":3731},{"style":974},[3732],{"type":399,"value":977},{"type":393,"tag":483,"props":3734,"children":3735},{"style":489},[3736],{"type":399,"value":561},{"type":393,"tag":483,"props":3738,"children":3739},{"style":564},[3740],{"type":399,"value":986},{"type":393,"tag":483,"props":3742,"children":3743},{"style":495},[3744],{"type":399,"value":1661},{"type":393,"tag":483,"props":3746,"children":3747},{"style":522},[3748],{"type":399,"value":3749},"# Different separator\n",{"type":393,"tag":483,"props":3751,"children":3752},{"class":485,"line":36},[3753,3757,3761,3765,3769,3773,3778,3782,3786,3790],{"type":393,"tag":483,"props":3754,"children":3755},{"style":495},[3756],{"type":399,"value":685},{"type":393,"tag":483,"props":3758,"children":3759},{"style":489},[3760],{"type":399,"value":561},{"type":393,"tag":483,"props":3762,"children":3763},{"style":495},[3764],{"type":399,"value":694},{"type":393,"tag":483,"props":3766,"children":3767},{"style":564},[3768],{"type":399,"value":3701},{"type":393,"tag":483,"props":3770,"children":3771},{"style":495},[3772],{"type":399,"value":635},{"type":393,"tag":483,"props":3774,"children":3775},{"style":974},[3776],{"type":399,"value":3777},"header",{"type":393,"tag":483,"props":3779,"children":3780},{"style":489},[3781],{"type":399,"value":561},{"type":393,"tag":483,"props":3783,"children":3784},{"style":617},[3785],{"type":399,"value":1656},{"type":393,"tag":483,"props":3787,"children":3788},{"style":495},[3789],{"type":399,"value":1661},{"type":393,"tag":483,"props":3791,"children":3792},{"style":522},[3793],{"type":399,"value":3794},"# First row as headers\n",{"type":393,"tag":402,"props":3796,"children":3797},{},[3798],{"type":393,"tag":418,"props":3799,"children":3800},{},[3801],{"type":399,"value":3802},"Excel Files:",{"type":393,"tag":472,"props":3804,"children":3806},{"className":474,"code":3805,"language":476,"meta":6,"style":6},"df = pd.read_excel('file.xlsx')\ndf = pd.read_excel('file.xlsx', sheet_name='Sheet2')\ndf = pd.read_excel('file.xlsx', header=1)  # Second row as headers\n",[3807],{"type":393,"tag":479,"props":3808,"children":3809},{"__ignoreMap":6},[3810,3833,3873],{"type":393,"tag":483,"props":3811,"children":3812},{"class":485,"line":11},[3813,3817,3821,3825,3829],{"type":393,"tag":483,"props":3814,"children":3815},{"style":495},[3816],{"type":399,"value":685},{"type":393,"tag":483,"props":3818,"children":3819},{"style":489},[3820],{"type":399,"value":561},{"type":393,"tag":483,"props":3822,"children":3823},{"style":495},[3824],{"type":399,"value":1340},{"type":393,"tag":483,"props":3826,"children":3827},{"style":564},[3828],{"type":399,"value":1597},{"type":393,"tag":483,"props":3830,"children":3831},{"style":495},[3832],{"type":399,"value":703},{"type":393,"tag":483,"props":3834,"children":3835},{"class":485,"line":27},[3836,3840,3844,3848,3852,3856,3860,3864,3869],{"type":393,"tag":483,"props":3837,"children":3838},{"style":495},[3839],{"type":399,"value":685},{"type":393,"tag":483,"props":3841,"children":3842},{"style":489},[3843],{"type":399,"value":561},{"type":393,"tag":483,"props":3845,"children":3846},{"style":495},[3847],{"type":399,"value":1340},{"type":393,"tag":483,"props":3849,"children":3850},{"style":564},[3851],{"type":399,"value":1597},{"type":393,"tag":483,"props":3853,"children":3854},{"style":495},[3855],{"type":399,"value":635},{"type":393,"tag":483,"props":3857,"children":3858},{"style":974},[3859],{"type":399,"value":1606},{"type":393,"tag":483,"props":3861,"children":3862},{"style":489},[3863],{"type":399,"value":561},{"type":393,"tag":483,"props":3865,"children":3866},{"style":564},[3867],{"type":399,"value":3868},"'Sheet2'",{"type":393,"tag":483,"props":3870,"children":3871},{"style":495},[3872],{"type":399,"value":703},{"type":393,"tag":483,"props":3874,"children":3875},{"class":485,"line":36},[3876,3880,3884,3888,3892,3896,3900,3904,3909,3913],{"type":393,"tag":483,"props":3877,"children":3878},{"style":495},[3879],{"type":399,"value":685},{"type":393,"tag":483,"props":3881,"children":3882},{"style":489},[3883],{"type":399,"value":561},{"type":393,"tag":483,"props":3885,"children":3886},{"style":495},[3887],{"type":399,"value":1340},{"type":393,"tag":483,"props":3889,"children":3890},{"style":564},[3891],{"type":399,"value":1597},{"type":393,"tag":483,"props":3893,"children":3894},{"style":495},[3895],{"type":399,"value":635},{"type":393,"tag":483,"props":3897,"children":3898},{"style":974},[3899],{"type":399,"value":3777},{"type":393,"tag":483,"props":3901,"children":3902},{"style":489},[3903],{"type":399,"value":561},{"type":393,"tag":483,"props":3905,"children":3906},{"style":617},[3907],{"type":399,"value":3908},"1",{"type":393,"tag":483,"props":3910,"children":3911},{"style":495},[3912],{"type":399,"value":1661},{"type":393,"tag":483,"props":3914,"children":3915},{"style":522},[3916],{"type":399,"value":3917},"# Second row as headers\n",{"type":393,"tag":402,"props":3919,"children":3920},{},[3921],{"type":393,"tag":418,"props":3922,"children":3923},{},[3924],{"type":399,"value":3925},"JSON Files:",{"type":393,"tag":472,"props":3927,"children":3929},{"className":474,"code":3928,"language":476,"meta":6,"style":6},"df = pd.read_json('file.json')\ndf = pd.read_json('file.json', orient='records')  # For list format\n",[3930],{"type":393,"tag":479,"props":3931,"children":3932},{"__ignoreMap":6},[3933,3957],{"type":393,"tag":483,"props":3934,"children":3935},{"class":485,"line":11},[3936,3940,3944,3948,3953],{"type":393,"tag":483,"props":3937,"children":3938},{"style":495},[3939],{"type":399,"value":685},{"type":393,"tag":483,"props":3941,"children":3942},{"style":489},[3943],{"type":399,"value":561},{"type":393,"tag":483,"props":3945,"children":3946},{"style":495},[3947],{"type":399,"value":2076},{"type":393,"tag":483,"props":3949,"children":3950},{"style":564},[3951],{"type":399,"value":3952},"'file.json'",{"type":393,"tag":483,"props":3954,"children":3955},{"style":495},[3956],{"type":399,"value":703},{"type":393,"tag":483,"props":3958,"children":3959},{"class":485,"line":27},[3960,3964,3968,3972,3976,3980,3985,3989,3994,3998],{"type":393,"tag":483,"props":3961,"children":3962},{"style":495},[3963],{"type":399,"value":685},{"type":393,"tag":483,"props":3965,"children":3966},{"style":489},[3967],{"type":399,"value":561},{"type":393,"tag":483,"props":3969,"children":3970},{"style":495},[3971],{"type":399,"value":2076},{"type":393,"tag":483,"props":3973,"children":3974},{"style":564},[3975],{"type":399,"value":3952},{"type":393,"tag":483,"props":3977,"children":3978},{"style":495},[3979],{"type":399,"value":635},{"type":393,"tag":483,"props":3981,"children":3982},{"style":974},[3983],{"type":399,"value":3984},"orient",{"type":393,"tag":483,"props":3986,"children":3987},{"style":489},[3988],{"type":399,"value":561},{"type":393,"tag":483,"props":3990,"children":3991},{"style":564},[3992],{"type":399,"value":3993},"'records'",{"type":393,"tag":483,"props":3995,"children":3996},{"style":495},[3997],{"type":399,"value":1661},{"type":393,"tag":483,"props":3999,"children":4000},{"style":522},[4001],{"type":399,"value":4002},"# For list format\n",{"type":393,"tag":402,"props":4004,"children":4005},{},[4006],{"type":393,"tag":418,"props":4007,"children":4008},{},[4009],{"type":399,"value":4010},"Always After Loading:",{"type":393,"tag":472,"props":4012,"children":4014},{"className":474,"code":4013,"language":476,"meta":6,"style":6},"print(df.shape)      # Check size\nprint(df.head())     # See first rows\nprint(df.info())     # Check data types\n",[4015],{"type":393,"tag":479,"props":4016,"children":4017},{"__ignoreMap":6},[4018,4035,4052],{"type":393,"tag":483,"props":4019,"children":4020},{"class":485,"line":11},[4021,4025,4030],{"type":393,"tag":483,"props":4022,"children":4023},{"style":617},[4024],{"type":399,"value":711},{"type":393,"tag":483,"props":4026,"children":4027},{"style":495},[4028],{"type":399,"value":4029},"(df.shape)      ",{"type":393,"tag":483,"props":4031,"children":4032},{"style":522},[4033],{"type":399,"value":4034},"# Check size\n",{"type":393,"tag":483,"props":4036,"children":4037},{"class":485,"line":27},[4038,4042,4047],{"type":393,"tag":483,"props":4039,"children":4040},{"style":617},[4041],{"type":399,"value":711},{"type":393,"tag":483,"props":4043,"children":4044},{"style":495},[4045],{"type":399,"value":4046},"(df.head())     ",{"type":393,"tag":483,"props":4048,"children":4049},{"style":522},[4050],{"type":399,"value":4051},"# See first rows\n",{"type":393,"tag":483,"props":4053,"children":4054},{"class":485,"line":36},[4055,4059,4064],{"type":393,"tag":483,"props":4056,"children":4057},{"style":617},[4058],{"type":399,"value":711},{"type":393,"tag":483,"props":4060,"children":4061},{"style":495},[4062],{"type":399,"value":4063},"(df.info())     ",{"type":393,"tag":483,"props":4065,"children":4066},{"style":522},[4067],{"type":399,"value":4068},"# Check data types\n",{"type":393,"tag":456,"props":4070,"children":4072},{"id":4071},"whats-next",[4073],{"type":399,"value":4074},"🚀 What's Next?",{"type":393,"tag":402,"props":4076,"children":4077},{},[4078],{"type":399,"value":4079},"Great! You can now load data from the most common file formats. Next, let's learn how to connect to databases and load data directly from them.",{"type":393,"tag":402,"props":4081,"children":4082},{},[4083,4088,4089],{"type":393,"tag":418,"props":4084,"children":4085},{},[4086],{"type":399,"value":4087},"Continue to",{"type":399,"value":1814},{"type":393,"tag":4090,"props":4091,"children":4092},"a",{"href":88},[4093],{"type":399,"value":89},{"type":393,"tag":402,"props":4095,"children":4096},{},[4097],{"type":399,"value":4098},"You're ready for real-world data! 📊💪",{"type":393,"tag":4100,"props":4101,"children":4102},"style",{},[4103],{"type":399,"value":4104},"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":4106},[4107,4110,4113,4114,4118,4119,4120,4121],{"id":458,"depth":27,"text":461,"children":4108},[4109],{"id":785,"depth":36,"text":788},{"id":1024,"depth":27,"text":1027,"children":4111},[4112],{"id":1382,"depth":36,"text":1385},{"id":1715,"depth":27,"text":1718},{"id":2118,"depth":27,"text":2121,"children":4115},[4116,4117],{"id":2129,"depth":36,"text":2132},{"id":2521,"depth":36,"text":2524},{"id":2860,"depth":27,"text":2863},{"id":3480,"depth":27,"text":3483},{"id":3657,"depth":27,"text":3660},{"id":4071,"depth":27,"text":4074},1782373728960]