[{"data":1,"prerenderedAt":7343},["ShallowReactive",2],{"tutorials-pandas":3,"category-items-pandas":387,"content-/pandas/using-loc-and-iloc":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},"/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},"/pandas/data-cleaning","Data Cleaning","Learn essential data cleaning techniques to prepare messy data for analysis","data-cleaning",19,"pi pi-wrench","content:pandas:19.data-cleaning.md","pandas/19.data-cleaning.md","pandas/19.data-cleaning",[192,201,210,219],{"_path":193,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":194,"description":195,"slug":196,"parentId":182,"order":197,"_type":14,"_id":198,"_source":16,"_file":199,"_stem":200,"_extension":19},"/pandas/handling-missing-data","Handling Missing Data","Learn to identify, fill, and remove missing values in your DataFrames effectively","handling-missing-data",20,"content:pandas:20.handling-missing-data.md","pandas/20.handling-missing-data.md","pandas/20.handling-missing-data",{"_path":202,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":203,"description":204,"slug":205,"parentId":182,"order":206,"_type":14,"_id":207,"_source":16,"_file":208,"_stem":209,"_extension":19},"/pandas/removing-duplicates","Removing Duplicates","Learn to find and eliminate duplicate rows from your DataFrames to ensure data quality","removing-duplicates",21,"content:pandas:21.removing-duplicates.md","pandas/21.removing-duplicates.md","pandas/21.removing-duplicates",{"_path":211,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":212,"description":213,"slug":214,"parentId":182,"order":215,"_type":14,"_id":216,"_source":16,"_file":217,"_stem":218,"_extension":19},"/pandas/data-type-conversion","Data Type Conversion","Learn to convert data to the right types for proper analysis and calculations","data-type-conversion",22,"content:pandas:22.data-type-conversion.md","pandas/22.data-type-conversion.md","pandas/22.data-type-conversion",{"_path":220,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":221,"description":222,"slug":223,"parentId":182,"order":224,"_type":14,"_id":225,"_source":16,"_file":226,"_stem":227,"_extension":19},"/pandas/string-cleaning-operations","String Cleaning Operations","Learn to clean and standardize text data for consistent analysis using pandas string methods","string-cleaning-operations",23,"content:pandas:23.string-cleaning-operations.md","pandas/23.string-cleaning-operations.md","pandas/23.string-cleaning-operations",{"_path":229,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":230,"description":231,"slug":232,"order":233,"isParent":12,"icon":234,"_type":14,"_id":235,"_source":16,"_file":236,"_stem":237,"_extension":19,"children":238},"/pandas/data-transformation","Data Transformation","Learn how to modify, add, and transform data in your DataFrames for analysis","data-transformation",24,"pi pi-folder","content:pandas:24.data-transformation.md","pandas/24.data-transformation.md","pandas/24.data-transformation",[239,248,257],{"_path":240,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":241,"description":242,"slug":243,"parentId":229,"order":244,"_type":14,"_id":245,"_source":16,"_file":246,"_stem":247,"_extension":19},"/pandas/adding-and-modifying-columns","Adding and Modifying Columns","Learn how to create new columns and update existing ones with calculations and conditional logic","adding-and-modifying-columns",25,"content:pandas:25.adding-and-modifying-columns.md","pandas/25.adding-and-modifying-columns.md","pandas/25.adding-and-modifying-columns",{"_path":249,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":250,"description":251,"slug":252,"parentId":229,"order":253,"_type":14,"_id":254,"_source":16,"_file":255,"_stem":256,"_extension":19},"/pandas/applying-functions","Applying Functions","Use built-in and custom functions to transform your data efficiently","applying-functions",26,"content:pandas:26.applying-functions.md","pandas/26.applying-functions.md","pandas/26.applying-functions",{"_path":258,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":259,"description":260,"slug":261,"parentId":229,"order":262,"_type":14,"_id":263,"_source":16,"_file":264,"_stem":265,"_extension":19},"/pandas/renaming-and-sorting-data","Renaming and Sorting Data","Organize your DataFrame with better column names and logical data ordering","renaming-and-sorting-data",27,"content:pandas:27.renaming-and-sorting-data.md","pandas/27.renaming-and-sorting-data.md","pandas/27.renaming-and-sorting-data",{"_path":267,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":268,"description":269,"slug":270,"order":271,"isParent":12,"icon":234,"_type":14,"_id":272,"_source":16,"_file":273,"_stem":274,"_extension":19,"children":275},"/pandas/grouping-and-aggregation","Grouping and Aggregation","Learn to group data and calculate summary statistics for powerful data analysis","grouping-and-aggregation",28,"content:pandas:28.grouping-and-aggregation.md","pandas/28.grouping-and-aggregation.md","pandas/28.grouping-and-aggregation",[276,285,294],{"_path":277,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":278,"description":279,"slug":280,"parentId":267,"order":281,"_type":14,"_id":282,"_source":16,"_file":283,"_stem":284,"_extension":19},"/pandas/groupby-operations","GroupBy Operations","Learn the fundamentals of splitting data into groups and basic aggregations","groupby-operations",29,"content:pandas:29.groupby-operations.md","pandas/29.groupby-operations.md","pandas/29.groupby-operations",{"_path":286,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":287,"description":288,"slug":289,"parentId":267,"order":290,"_type":14,"_id":291,"_source":16,"_file":292,"_stem":293,"_extension":19},"/pandas/aggregation-functions","Aggregation Functions","Explore different ways to summarize your grouped data with built-in and custom functions","aggregation-functions",30,"content:pandas:30.aggregation-functions.md","pandas/30.aggregation-functions.md","pandas/30.aggregation-functions",{"_path":295,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":296,"description":297,"slug":298,"parentId":267,"order":299,"_type":14,"_id":300,"_source":16,"_file":301,"_stem":302,"_extension":19},"/pandas/pivot-tables-and-cross-tabulation","Pivot Tables and Cross Tabulation","Create powerful summary tables and cross-tabulations for analysis","pivot-tables-and-cross-tabulation",31,"content:pandas:31.pivot-tables-and-cross-tabulation.md","pandas/31.pivot-tables-and-cross-tabulation.md","pandas/31.pivot-tables-and-cross-tabulation",{"_path":304,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":305,"description":306,"slug":307,"order":308,"isParent":12,"icon":234,"_type":14,"_id":309,"_source":16,"_file":310,"_stem":311,"_extension":19,"children":312},"/pandas/combining-data","Combining Data","Learn to combine data from multiple DataFrames for comprehensive analysis","combining-data",32,"content:pandas:32.combining-data.md","pandas/32.combining-data.md","pandas/32.combining-data",[313,322],{"_path":314,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":315,"description":316,"slug":317,"parentId":304,"order":318,"_type":14,"_id":319,"_source":16,"_file":320,"_stem":321,"_extension":19},"/pandas/concatenating-dataframes","Concatenating DataFrames","Learn to stack DataFrames vertically and horizontally for simple data combination","concatenating-dataframes",33,"content:pandas:33.concatenating-dataframes.md","pandas/33.concatenating-dataframes.md","pandas/33.concatenating-dataframes",{"_path":323,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":324,"description":325,"slug":326,"parentId":304,"order":327,"_type":14,"_id":328,"_source":16,"_file":329,"_stem":330,"_extension":19},"/pandas/merging-and-join-operations","Merging and Join Operations","Master different types of joins to combine related data from multiple sources","merging-and-join-operations",34,"content:pandas:34.merging-and-join-operations.md","pandas/34.merging-and-join-operations.md","pandas/34.merging-and-join-operations",{"_path":332,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":333,"description":334,"slug":335,"order":336,"isParent":12,"icon":234,"_type":14,"_id":337,"_source":16,"_file":338,"_stem":339,"_extension":19,"children":340},"/pandas/working-with-dates","Working with Dates","Master date and time operations for time-based analysis and reporting","working-with-dates",35,"content:pandas:35.working-with-dates.md","pandas/35.working-with-dates.md","pandas/35.working-with-dates",[341,350],{"_path":342,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":343,"description":344,"slug":345,"parentId":332,"order":346,"_type":14,"_id":347,"_source":16,"_file":348,"_stem":349,"_extension":19},"/pandas/datetime-operations","DateTime Operations","Learn to convert, manipulate, and extract information from dates and times","datetime-operations",36,"content:pandas:36.datetime-operations.md","pandas/36.datetime-operations.md","pandas/36.datetime-operations",{"_path":351,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":352,"description":353,"slug":354,"parentId":332,"order":355,"_type":14,"_id":356,"_source":16,"_file":357,"_stem":358,"_extension":19},"/pandas/time-series-and-resampling","Time Series and Resampling","Discover how to analyze data over time periods and aggregate by different time intervals","time-series-and-resampling",37,"content:pandas:37.time-series-and-resampling.md","pandas/37.time-series-and-resampling.md","pandas/37.time-series-and-resampling",{"_path":360,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":361,"description":362,"slug":363,"order":364,"isParent":12,"icon":234,"_type":14,"_id":365,"_source":16,"_file":366,"_stem":367,"_extension":19,"children":368},"/pandas/saving-your-work","Saving Your Work","Learn to export your analyzed data to different formats for sharing and reporting","saving-your-work",38,"content:pandas:38.saving-your-work.md","pandas/38.saving-your-work.md","pandas/38.saving-your-work",[369,378],{"_path":370,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":371,"description":372,"slug":373,"parentId":360,"order":374,"_type":14,"_id":375,"_source":16,"_file":376,"_stem":377,"_extension":19},"/pandas/exporting-data","Exporting Data (CSV, Excel, JSON)","Learn to save your DataFrames to common file formats for sharing and reporting","exporting-data",39,"content:pandas:39.exporting-data.md","pandas/39.exporting-data.md","pandas/39.exporting-data",{"_path":379,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":380,"description":381,"slug":382,"parentId":360,"order":383,"_type":14,"_id":384,"_source":16,"_file":385,"_stem":386,"_extension":19},"/pandas/database-export","Database Export","Discover how to save data back to databases for integration with other systems","database-export",40,"content:pandas:40.database-export.md","pandas/40.database-export.md","pandas/40.database-export",[163],{"_path":164,"_dir":23,"_draft":7,"_partial":7,"_locale":6,"title":165,"description":166,"slug":167,"parentId":144,"order":168,"body":389,"_type":14,"_id":169,"_source":16,"_file":170,"_stem":171,"_extension":19},{"type":390,"children":391,"toc":7330},"root",[392,400,421,549,556,566,1252,1258,1268,1907,1913,1918,2606,2612,2617,3276,3282,3287,4256,4262,4267,5107,5113,5348,5354,5359,5592,6272,6278,6510,6516,6521,7294,7300,7305,7319,7324],{"type":393,"tag":394,"props":395,"children":396},"element","h1",{"id":167},[397],{"type":398,"value":399},"text","🔍 Using loc and iloc",{"type":393,"tag":401,"props":402,"children":403},"p",{},[404,411,413,419],{"type":393,"tag":405,"props":406,"children":408},"code",{"className":407},[],[409],{"type":398,"value":410},"loc",{"type":398,"value":412}," and ",{"type":393,"tag":405,"props":414,"children":416},{"className":415},[],[417],{"type":398,"value":418},"iloc",{"type":398,"value":420}," are pandas' precision tools for selecting data. Think of them as the difference between finding a house by its address (loc) versus finding it by \"the 3rd house on the left\" (iloc). Both get you there, but they use different approaches!",{"type":393,"tag":422,"props":423,"children":427},"info-box",{"emoji":424,"title":425,"type":426},"🔍","loc vs iloc - Quick Comparison","info",[428,437,477,485,520,528],{"type":393,"tag":401,"props":429,"children":430},{},[431],{"type":393,"tag":432,"props":433,"children":434},"strong",{},[435],{"type":398,"value":436},"loc (Label-based):",{"type":393,"tag":438,"props":439,"children":440},"ul",{},[441,447,458],{"type":393,"tag":442,"props":443,"children":444},"li",{},[445],{"type":398,"value":446},"Uses index labels and column names",{"type":393,"tag":442,"props":448,"children":449},{},[450,452],{"type":398,"value":451},"Syntax: ",{"type":393,"tag":405,"props":453,"children":455},{"className":454},[],[456],{"type":398,"value":457},"df.loc[rows, columns]",{"type":393,"tag":442,"props":459,"children":460},{},[461,463,469,471],{"type":398,"value":462},"Example: ",{"type":393,"tag":405,"props":464,"children":466},{"className":465},[],[467],{"type":398,"value":468},"df.loc[0, 'name']",{"type":398,"value":470}," or ",{"type":393,"tag":405,"props":472,"children":474},{"className":473},[],[475],{"type":398,"value":476},"df.loc[0:2, 'name':'age']",{"type":393,"tag":401,"props":478,"children":479},{},[480],{"type":393,"tag":432,"props":481,"children":482},{},[483],{"type":398,"value":484},"iloc (Position-based):",{"type":393,"tag":438,"props":486,"children":487},{},[488,493,503],{"type":393,"tag":442,"props":489,"children":490},{},[491],{"type":398,"value":492},"Uses numeric positions (0, 1, 2...)",{"type":393,"tag":442,"props":494,"children":495},{},[496,497],{"type":398,"value":451},{"type":393,"tag":405,"props":498,"children":500},{"className":499},[],[501],{"type":398,"value":502},"df.iloc[rows, columns]",{"type":393,"tag":442,"props":504,"children":505},{},[506,507,513,514],{"type":398,"value":462},{"type":393,"tag":405,"props":508,"children":510},{"className":509},[],[511],{"type":398,"value":512},"df.iloc[0, 1]",{"type":398,"value":470},{"type":393,"tag":405,"props":515,"children":517},{"className":516},[],[518],{"type":398,"value":519},"df.iloc[0:2, 1:3]",{"type":393,"tag":401,"props":521,"children":522},{},[523],{"type":393,"tag":432,"props":524,"children":525},{},[526],{"type":398,"value":527},"Think of it like:",{"type":393,"tag":438,"props":529,"children":530},{},[531,540],{"type":393,"tag":442,"props":532,"children":533},{},[534,538],{"type":393,"tag":432,"props":535,"children":536},{},[537],{"type":398,"value":410},{"type":398,"value":539}," = Finding by street address (\"123 Main St\")",{"type":393,"tag":442,"props":541,"children":542},{},[543,547],{"type":393,"tag":432,"props":544,"children":545},{},[546],{"type":398,"value":418},{"type":398,"value":548}," = Finding by position (\"3rd house from the corner\")",{"type":393,"tag":550,"props":551,"children":553},"h2",{"id":552},"understanding-iloc-position-based",[554],{"type":398,"value":555},"🏠 Understanding iloc (Position-Based)",{"type":393,"tag":401,"props":557,"children":558},{},[559,564],{"type":393,"tag":405,"props":560,"children":562},{"className":561},[],[563],{"type":398,"value":418},{"type":398,"value":565}," uses positions like counting: 0, 1, 2, 3... It's like finding seats in a theater by row and seat number.",{"type":393,"tag":567,"props":568,"children":569},"code-try",{},[570],{"type":393,"tag":571,"props":572,"children":576},"pre",{"className":573,"code":574,"language":575,"meta":6,"style":6},"language-python shiki shiki-themes github-light github-dark","import pandas as pd\n\n# Student grades\ngrades = pd.DataFrame({\n    'name': ['Alice', 'Bob', 'Charlie', 'Diana'],\n    'math': [85, 92, 78, 95],\n    'science': [90, 88, 85, 92],\n    'english': [88, 85, 90, 89]\n})\n\nprint(\"Student Grades:\")\nprint(grades)\nprint()\n\nprint(\"🔍 iloc Examples (Position-based):\")\nprint()\n\n# Single cell - row 0, column 1\nprint(\"1️⃣ First student's math grade:\")\nprint(grades.iloc[0, 1])  # Row 0, Column 1 (math)\nprint()\n\n# Single row - all columns\nprint(\"2️⃣ Bob's all grades (row 1):\")\nprint(grades.iloc[1])\nprint()\n\n# Multiple rows and columns\nprint(\"3️⃣ First 2 students, math and science:\")\nprint(grades.iloc[0:2, 1:3])\nprint()\n\n# Specific positions\nprint(\"4️⃣ Alice and Charlie's names:\")\nprint(grades.iloc[[0, 2], 0])  # Rows 0,2, Column 0\n","python",[577],{"type":393,"tag":405,"props":578,"children":579},{"__ignoreMap":6},[580,607,615,624,642,694,743,789,835,843,850,873,885,897,904,924,935,942,950,970,1006,1017,1024,1032,1052,1072,1083,1090,1098,1118,1164,1175,1182,1190,1210],{"type":393,"tag":581,"props":582,"children":584},"span",{"class":583,"line":11},"line",[585,591,597,602],{"type":393,"tag":581,"props":586,"children":588},{"style":587},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[589],{"type":398,"value":590},"import",{"type":393,"tag":581,"props":592,"children":594},{"style":593},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[595],{"type":398,"value":596}," pandas ",{"type":393,"tag":581,"props":598,"children":599},{"style":587},[600],{"type":398,"value":601},"as",{"type":393,"tag":581,"props":603,"children":604},{"style":593},[605],{"type":398,"value":606}," pd\n",{"type":393,"tag":581,"props":608,"children":609},{"class":583,"line":27},[610],{"type":393,"tag":581,"props":611,"children":612},{"emptyLinePlaceholder":12},[613],{"type":398,"value":614},"\n",{"type":393,"tag":581,"props":616,"children":617},{"class":583,"line":36},[618],{"type":393,"tag":581,"props":619,"children":621},{"style":620},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[622],{"type":398,"value":623},"# Student grades\n",{"type":393,"tag":581,"props":625,"children":626},{"class":583,"line":45},[627,632,637],{"type":393,"tag":581,"props":628,"children":629},{"style":593},[630],{"type":398,"value":631},"grades ",{"type":393,"tag":581,"props":633,"children":634},{"style":587},[635],{"type":398,"value":636},"=",{"type":393,"tag":581,"props":638,"children":639},{"style":593},[640],{"type":398,"value":641}," pd.DataFrame({\n",{"type":393,"tag":581,"props":643,"children":644},{"class":583,"line":54},[645,651,656,661,666,671,675,680,684,689],{"type":393,"tag":581,"props":646,"children":648},{"style":647},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[649],{"type":398,"value":650},"    'name'",{"type":393,"tag":581,"props":652,"children":653},{"style":593},[654],{"type":398,"value":655},": [",{"type":393,"tag":581,"props":657,"children":658},{"style":647},[659],{"type":398,"value":660},"'Alice'",{"type":393,"tag":581,"props":662,"children":663},{"style":593},[664],{"type":398,"value":665},", ",{"type":393,"tag":581,"props":667,"children":668},{"style":647},[669],{"type":398,"value":670},"'Bob'",{"type":393,"tag":581,"props":672,"children":673},{"style":593},[674],{"type":398,"value":665},{"type":393,"tag":581,"props":676,"children":677},{"style":647},[678],{"type":398,"value":679},"'Charlie'",{"type":393,"tag":581,"props":681,"children":682},{"style":593},[683],{"type":398,"value":665},{"type":393,"tag":581,"props":685,"children":686},{"style":647},[687],{"type":398,"value":688},"'Diana'",{"type":393,"tag":581,"props":690,"children":691},{"style":593},[692],{"type":398,"value":693},"],\n",{"type":393,"tag":581,"props":695,"children":696},{"class":583,"line":63},[697,702,706,712,716,721,725,730,734,739],{"type":393,"tag":581,"props":698,"children":699},{"style":647},[700],{"type":398,"value":701},"    'math'",{"type":393,"tag":581,"props":703,"children":704},{"style":593},[705],{"type":398,"value":655},{"type":393,"tag":581,"props":707,"children":709},{"style":708},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[710],{"type":398,"value":711},"85",{"type":393,"tag":581,"props":713,"children":714},{"style":593},[715],{"type":398,"value":665},{"type":393,"tag":581,"props":717,"children":718},{"style":708},[719],{"type":398,"value":720},"92",{"type":393,"tag":581,"props":722,"children":723},{"style":593},[724],{"type":398,"value":665},{"type":393,"tag":581,"props":726,"children":727},{"style":708},[728],{"type":398,"value":729},"78",{"type":393,"tag":581,"props":731,"children":732},{"style":593},[733],{"type":398,"value":665},{"type":393,"tag":581,"props":735,"children":736},{"style":708},[737],{"type":398,"value":738},"95",{"type":393,"tag":581,"props":740,"children":741},{"style":593},[742],{"type":398,"value":693},{"type":393,"tag":581,"props":744,"children":745},{"class":583,"line":72},[746,751,755,760,764,769,773,777,781,785],{"type":393,"tag":581,"props":747,"children":748},{"style":647},[749],{"type":398,"value":750},"    'science'",{"type":393,"tag":581,"props":752,"children":753},{"style":593},[754],{"type":398,"value":655},{"type":393,"tag":581,"props":756,"children":757},{"style":708},[758],{"type":398,"value":759},"90",{"type":393,"tag":581,"props":761,"children":762},{"style":593},[763],{"type":398,"value":665},{"type":393,"tag":581,"props":765,"children":766},{"style":708},[767],{"type":398,"value":768},"88",{"type":393,"tag":581,"props":770,"children":771},{"style":593},[772],{"type":398,"value":665},{"type":393,"tag":581,"props":774,"children":775},{"style":708},[776],{"type":398,"value":711},{"type":393,"tag":581,"props":778,"children":779},{"style":593},[780],{"type":398,"value":665},{"type":393,"tag":581,"props":782,"children":783},{"style":708},[784],{"type":398,"value":720},{"type":393,"tag":581,"props":786,"children":787},{"style":593},[788],{"type":398,"value":693},{"type":393,"tag":581,"props":790,"children":791},{"class":583,"line":83},[792,797,801,805,809,813,817,821,825,830],{"type":393,"tag":581,"props":793,"children":794},{"style":647},[795],{"type":398,"value":796},"    'english'",{"type":393,"tag":581,"props":798,"children":799},{"style":593},[800],{"type":398,"value":655},{"type":393,"tag":581,"props":802,"children":803},{"style":708},[804],{"type":398,"value":768},{"type":393,"tag":581,"props":806,"children":807},{"style":593},[808],{"type":398,"value":665},{"type":393,"tag":581,"props":810,"children":811},{"style":708},[812],{"type":398,"value":711},{"type":393,"tag":581,"props":814,"children":815},{"style":593},[816],{"type":398,"value":665},{"type":393,"tag":581,"props":818,"children":819},{"style":708},[820],{"type":398,"value":759},{"type":393,"tag":581,"props":822,"children":823},{"style":593},[824],{"type":398,"value":665},{"type":393,"tag":581,"props":826,"children":827},{"style":708},[828],{"type":398,"value":829},"89",{"type":393,"tag":581,"props":831,"children":832},{"style":593},[833],{"type":398,"value":834},"]\n",{"type":393,"tag":581,"props":836,"children":837},{"class":583,"line":92},[838],{"type":393,"tag":581,"props":839,"children":840},{"style":593},[841],{"type":398,"value":842},"})\n",{"type":393,"tag":581,"props":844,"children":845},{"class":583,"line":101},[846],{"type":393,"tag":581,"props":847,"children":848},{"emptyLinePlaceholder":12},[849],{"type":398,"value":614},{"type":393,"tag":581,"props":851,"children":852},{"class":583,"line":110},[853,858,863,868],{"type":393,"tag":581,"props":854,"children":855},{"style":708},[856],{"type":398,"value":857},"print",{"type":393,"tag":581,"props":859,"children":860},{"style":593},[861],{"type":398,"value":862},"(",{"type":393,"tag":581,"props":864,"children":865},{"style":647},[866],{"type":398,"value":867},"\"Student Grades:\"",{"type":393,"tag":581,"props":869,"children":870},{"style":593},[871],{"type":398,"value":872},")\n",{"type":393,"tag":581,"props":874,"children":875},{"class":583,"line":121},[876,880],{"type":393,"tag":581,"props":877,"children":878},{"style":708},[879],{"type":398,"value":857},{"type":393,"tag":581,"props":881,"children":882},{"style":593},[883],{"type":398,"value":884},"(grades)\n",{"type":393,"tag":581,"props":886,"children":887},{"class":583,"line":130},[888,892],{"type":393,"tag":581,"props":889,"children":890},{"style":708},[891],{"type":398,"value":857},{"type":393,"tag":581,"props":893,"children":894},{"style":593},[895],{"type":398,"value":896},"()\n",{"type":393,"tag":581,"props":898,"children":899},{"class":583,"line":139},[900],{"type":393,"tag":581,"props":901,"children":902},{"emptyLinePlaceholder":12},[903],{"type":398,"value":614},{"type":393,"tag":581,"props":905,"children":906},{"class":583,"line":148},[907,911,915,920],{"type":393,"tag":581,"props":908,"children":909},{"style":708},[910],{"type":398,"value":857},{"type":393,"tag":581,"props":912,"children":913},{"style":593},[914],{"type":398,"value":862},{"type":393,"tag":581,"props":916,"children":917},{"style":647},[918],{"type":398,"value":919},"\"🔍 iloc Examples (Position-based):\"",{"type":393,"tag":581,"props":921,"children":922},{"style":593},[923],{"type":398,"value":872},{"type":393,"tag":581,"props":925,"children":926},{"class":583,"line":159},[927,931],{"type":393,"tag":581,"props":928,"children":929},{"style":708},[930],{"type":398,"value":857},{"type":393,"tag":581,"props":932,"children":933},{"style":593},[934],{"type":398,"value":896},{"type":393,"tag":581,"props":936,"children":937},{"class":583,"line":168},[938],{"type":393,"tag":581,"props":939,"children":940},{"emptyLinePlaceholder":12},[941],{"type":398,"value":614},{"type":393,"tag":581,"props":943,"children":944},{"class":583,"line":177},[945],{"type":393,"tag":581,"props":946,"children":947},{"style":620},[948],{"type":398,"value":949},"# Single cell - row 0, column 1\n",{"type":393,"tag":581,"props":951,"children":952},{"class":583,"line":186},[953,957,961,966],{"type":393,"tag":581,"props":954,"children":955},{"style":708},[956],{"type":398,"value":857},{"type":393,"tag":581,"props":958,"children":959},{"style":593},[960],{"type":398,"value":862},{"type":393,"tag":581,"props":962,"children":963},{"style":647},[964],{"type":398,"value":965},"\"1️⃣ First student's math grade:\"",{"type":393,"tag":581,"props":967,"children":968},{"style":593},[969],{"type":398,"value":872},{"type":393,"tag":581,"props":971,"children":972},{"class":583,"line":197},[973,977,982,987,991,996,1001],{"type":393,"tag":581,"props":974,"children":975},{"style":708},[976],{"type":398,"value":857},{"type":393,"tag":581,"props":978,"children":979},{"style":593},[980],{"type":398,"value":981},"(grades.iloc[",{"type":393,"tag":581,"props":983,"children":984},{"style":708},[985],{"type":398,"value":986},"0",{"type":393,"tag":581,"props":988,"children":989},{"style":593},[990],{"type":398,"value":665},{"type":393,"tag":581,"props":992,"children":993},{"style":708},[994],{"type":398,"value":995},"1",{"type":393,"tag":581,"props":997,"children":998},{"style":593},[999],{"type":398,"value":1000},"])  ",{"type":393,"tag":581,"props":1002,"children":1003},{"style":620},[1004],{"type":398,"value":1005},"# Row 0, Column 1 (math)\n",{"type":393,"tag":581,"props":1007,"children":1008},{"class":583,"line":206},[1009,1013],{"type":393,"tag":581,"props":1010,"children":1011},{"style":708},[1012],{"type":398,"value":857},{"type":393,"tag":581,"props":1014,"children":1015},{"style":593},[1016],{"type":398,"value":896},{"type":393,"tag":581,"props":1018,"children":1019},{"class":583,"line":215},[1020],{"type":393,"tag":581,"props":1021,"children":1022},{"emptyLinePlaceholder":12},[1023],{"type":398,"value":614},{"type":393,"tag":581,"props":1025,"children":1026},{"class":583,"line":224},[1027],{"type":393,"tag":581,"props":1028,"children":1029},{"style":620},[1030],{"type":398,"value":1031},"# Single row - all columns\n",{"type":393,"tag":581,"props":1033,"children":1034},{"class":583,"line":233},[1035,1039,1043,1048],{"type":393,"tag":581,"props":1036,"children":1037},{"style":708},[1038],{"type":398,"value":857},{"type":393,"tag":581,"props":1040,"children":1041},{"style":593},[1042],{"type":398,"value":862},{"type":393,"tag":581,"props":1044,"children":1045},{"style":647},[1046],{"type":398,"value":1047},"\"2️⃣ Bob's all grades (row 1):\"",{"type":393,"tag":581,"props":1049,"children":1050},{"style":593},[1051],{"type":398,"value":872},{"type":393,"tag":581,"props":1053,"children":1054},{"class":583,"line":244},[1055,1059,1063,1067],{"type":393,"tag":581,"props":1056,"children":1057},{"style":708},[1058],{"type":398,"value":857},{"type":393,"tag":581,"props":1060,"children":1061},{"style":593},[1062],{"type":398,"value":981},{"type":393,"tag":581,"props":1064,"children":1065},{"style":708},[1066],{"type":398,"value":995},{"type":393,"tag":581,"props":1068,"children":1069},{"style":593},[1070],{"type":398,"value":1071},"])\n",{"type":393,"tag":581,"props":1073,"children":1074},{"class":583,"line":253},[1075,1079],{"type":393,"tag":581,"props":1076,"children":1077},{"style":708},[1078],{"type":398,"value":857},{"type":393,"tag":581,"props":1080,"children":1081},{"style":593},[1082],{"type":398,"value":896},{"type":393,"tag":581,"props":1084,"children":1085},{"class":583,"line":262},[1086],{"type":393,"tag":581,"props":1087,"children":1088},{"emptyLinePlaceholder":12},[1089],{"type":398,"value":614},{"type":393,"tag":581,"props":1091,"children":1092},{"class":583,"line":271},[1093],{"type":393,"tag":581,"props":1094,"children":1095},{"style":620},[1096],{"type":398,"value":1097},"# Multiple rows and columns\n",{"type":393,"tag":581,"props":1099,"children":1100},{"class":583,"line":281},[1101,1105,1109,1114],{"type":393,"tag":581,"props":1102,"children":1103},{"style":708},[1104],{"type":398,"value":857},{"type":393,"tag":581,"props":1106,"children":1107},{"style":593},[1108],{"type":398,"value":862},{"type":393,"tag":581,"props":1110,"children":1111},{"style":647},[1112],{"type":398,"value":1113},"\"3️⃣ First 2 students, math and science:\"",{"type":393,"tag":581,"props":1115,"children":1116},{"style":593},[1117],{"type":398,"value":872},{"type":393,"tag":581,"props":1119,"children":1120},{"class":583,"line":290},[1121,1125,1129,1133,1138,1143,1147,1151,1155,1160],{"type":393,"tag":581,"props":1122,"children":1123},{"style":708},[1124],{"type":398,"value":857},{"type":393,"tag":581,"props":1126,"children":1127},{"style":593},[1128],{"type":398,"value":981},{"type":393,"tag":581,"props":1130,"children":1131},{"style":708},[1132],{"type":398,"value":986},{"type":393,"tag":581,"props":1134,"children":1135},{"style":593},[1136],{"type":398,"value":1137},":",{"type":393,"tag":581,"props":1139,"children":1140},{"style":708},[1141],{"type":398,"value":1142},"2",{"type":393,"tag":581,"props":1144,"children":1145},{"style":593},[1146],{"type":398,"value":665},{"type":393,"tag":581,"props":1148,"children":1149},{"style":708},[1150],{"type":398,"value":995},{"type":393,"tag":581,"props":1152,"children":1153},{"style":593},[1154],{"type":398,"value":1137},{"type":393,"tag":581,"props":1156,"children":1157},{"style":708},[1158],{"type":398,"value":1159},"3",{"type":393,"tag":581,"props":1161,"children":1162},{"style":593},[1163],{"type":398,"value":1071},{"type":393,"tag":581,"props":1165,"children":1166},{"class":583,"line":299},[1167,1171],{"type":393,"tag":581,"props":1168,"children":1169},{"style":708},[1170],{"type":398,"value":857},{"type":393,"tag":581,"props":1172,"children":1173},{"style":593},[1174],{"type":398,"value":896},{"type":393,"tag":581,"props":1176,"children":1177},{"class":583,"line":308},[1178],{"type":393,"tag":581,"props":1179,"children":1180},{"emptyLinePlaceholder":12},[1181],{"type":398,"value":614},{"type":393,"tag":581,"props":1183,"children":1184},{"class":583,"line":318},[1185],{"type":393,"tag":581,"props":1186,"children":1187},{"style":620},[1188],{"type":398,"value":1189},"# Specific positions\n",{"type":393,"tag":581,"props":1191,"children":1192},{"class":583,"line":327},[1193,1197,1201,1206],{"type":393,"tag":581,"props":1194,"children":1195},{"style":708},[1196],{"type":398,"value":857},{"type":393,"tag":581,"props":1198,"children":1199},{"style":593},[1200],{"type":398,"value":862},{"type":393,"tag":581,"props":1202,"children":1203},{"style":647},[1204],{"type":398,"value":1205},"\"4️⃣ Alice and Charlie's names:\"",{"type":393,"tag":581,"props":1207,"children":1208},{"style":593},[1209],{"type":398,"value":872},{"type":393,"tag":581,"props":1211,"children":1212},{"class":583,"line":336},[1213,1217,1222,1226,1230,1234,1239,1243,1247],{"type":393,"tag":581,"props":1214,"children":1215},{"style":708},[1216],{"type":398,"value":857},{"type":393,"tag":581,"props":1218,"children":1219},{"style":593},[1220],{"type":398,"value":1221},"(grades.iloc[[",{"type":393,"tag":581,"props":1223,"children":1224},{"style":708},[1225],{"type":398,"value":986},{"type":393,"tag":581,"props":1227,"children":1228},{"style":593},[1229],{"type":398,"value":665},{"type":393,"tag":581,"props":1231,"children":1232},{"style":708},[1233],{"type":398,"value":1142},{"type":393,"tag":581,"props":1235,"children":1236},{"style":593},[1237],{"type":398,"value":1238},"], ",{"type":393,"tag":581,"props":1240,"children":1241},{"style":708},[1242],{"type":398,"value":986},{"type":393,"tag":581,"props":1244,"children":1245},{"style":593},[1246],{"type":398,"value":1000},{"type":393,"tag":581,"props":1248,"children":1249},{"style":620},[1250],{"type":398,"value":1251},"# Rows 0,2, Column 0\n",{"type":393,"tag":550,"props":1253,"children":1255},{"id":1254},"️-understanding-loc-label-based",[1256],{"type":398,"value":1257},"🏷️ Understanding loc (Label-Based)",{"type":393,"tag":401,"props":1259,"children":1260},{},[1261,1266],{"type":393,"tag":405,"props":1262,"children":1264},{"className":1263},[],[1265],{"type":398,"value":410},{"type":398,"value":1267}," uses actual names/labels. It's like finding a person by their name rather than their position in line.",{"type":393,"tag":567,"props":1269,"children":1270},{},[1271],{"type":393,"tag":571,"props":1272,"children":1274},{"className":573,"code":1273,"language":575,"meta":6,"style":6},"import pandas as pd\n\n# Product inventory\ninventory = pd.DataFrame({\n    'product': ['Laptop', 'Mouse', 'Keyboard', 'Monitor'],\n    'stock': [15, 50, 25, 8],\n    'price': [999, 25, 75, 300],\n    'category': ['Computer', 'Accessory', 'Accessory', 'Computer']\n})\n\nprint(\"Product Inventory:\")\nprint(inventory)\nprint()\n\nprint(\"🏷️ loc Examples (Label-based):\")\nprint()\n\n# Single cell - row 0, column 'product'\nprint(\"1️⃣ First product name:\")\nprint(inventory.loc[0, 'product'])\nprint()\n\n# Single row - all columns\nprint(\"2️⃣ Mouse details (row 1):\")\nprint(inventory.loc[1])\nprint()\n\n# Multiple rows and specific columns\nprint(\"3️⃣ First 2 products, name and price:\")\nprint(inventory.loc[0:1, ['product', 'price']])\nprint()\n\n# Range of columns\nprint(\"4️⃣ All products, stock to price:\")\nprint(inventory.loc[:, 'stock':'price'])\n",[1275],{"type":393,"tag":405,"props":1276,"children":1277},{"__ignoreMap":6},[1278,1297,1304,1312,1328,1376,1424,1471,1517,1524,1531,1551,1563,1574,1581,1601,1612,1619,1627,1647,1676,1687,1694,1701,1721,1740,1751,1758,1766,1786,1832,1843,1850,1858,1878],{"type":393,"tag":581,"props":1279,"children":1280},{"class":583,"line":11},[1281,1285,1289,1293],{"type":393,"tag":581,"props":1282,"children":1283},{"style":587},[1284],{"type":398,"value":590},{"type":393,"tag":581,"props":1286,"children":1287},{"style":593},[1288],{"type":398,"value":596},{"type":393,"tag":581,"props":1290,"children":1291},{"style":587},[1292],{"type":398,"value":601},{"type":393,"tag":581,"props":1294,"children":1295},{"style":593},[1296],{"type":398,"value":606},{"type":393,"tag":581,"props":1298,"children":1299},{"class":583,"line":27},[1300],{"type":393,"tag":581,"props":1301,"children":1302},{"emptyLinePlaceholder":12},[1303],{"type":398,"value":614},{"type":393,"tag":581,"props":1305,"children":1306},{"class":583,"line":36},[1307],{"type":393,"tag":581,"props":1308,"children":1309},{"style":620},[1310],{"type":398,"value":1311},"# Product inventory\n",{"type":393,"tag":581,"props":1313,"children":1314},{"class":583,"line":45},[1315,1320,1324],{"type":393,"tag":581,"props":1316,"children":1317},{"style":593},[1318],{"type":398,"value":1319},"inventory ",{"type":393,"tag":581,"props":1321,"children":1322},{"style":587},[1323],{"type":398,"value":636},{"type":393,"tag":581,"props":1325,"children":1326},{"style":593},[1327],{"type":398,"value":641},{"type":393,"tag":581,"props":1329,"children":1330},{"class":583,"line":54},[1331,1336,1340,1345,1349,1354,1358,1363,1367,1372],{"type":393,"tag":581,"props":1332,"children":1333},{"style":647},[1334],{"type":398,"value":1335},"    'product'",{"type":393,"tag":581,"props":1337,"children":1338},{"style":593},[1339],{"type":398,"value":655},{"type":393,"tag":581,"props":1341,"children":1342},{"style":647},[1343],{"type":398,"value":1344},"'Laptop'",{"type":393,"tag":581,"props":1346,"children":1347},{"style":593},[1348],{"type":398,"value":665},{"type":393,"tag":581,"props":1350,"children":1351},{"style":647},[1352],{"type":398,"value":1353},"'Mouse'",{"type":393,"tag":581,"props":1355,"children":1356},{"style":593},[1357],{"type":398,"value":665},{"type":393,"tag":581,"props":1359,"children":1360},{"style":647},[1361],{"type":398,"value":1362},"'Keyboard'",{"type":393,"tag":581,"props":1364,"children":1365},{"style":593},[1366],{"type":398,"value":665},{"type":393,"tag":581,"props":1368,"children":1369},{"style":647},[1370],{"type":398,"value":1371},"'Monitor'",{"type":393,"tag":581,"props":1373,"children":1374},{"style":593},[1375],{"type":398,"value":693},{"type":393,"tag":581,"props":1377,"children":1378},{"class":583,"line":63},[1379,1384,1388,1393,1397,1402,1406,1411,1415,1420],{"type":393,"tag":581,"props":1380,"children":1381},{"style":647},[1382],{"type":398,"value":1383},"    'stock'",{"type":393,"tag":581,"props":1385,"children":1386},{"style":593},[1387],{"type":398,"value":655},{"type":393,"tag":581,"props":1389,"children":1390},{"style":708},[1391],{"type":398,"value":1392},"15",{"type":393,"tag":581,"props":1394,"children":1395},{"style":593},[1396],{"type":398,"value":665},{"type":393,"tag":581,"props":1398,"children":1399},{"style":708},[1400],{"type":398,"value":1401},"50",{"type":393,"tag":581,"props":1403,"children":1404},{"style":593},[1405],{"type":398,"value":665},{"type":393,"tag":581,"props":1407,"children":1408},{"style":708},[1409],{"type":398,"value":1410},"25",{"type":393,"tag":581,"props":1412,"children":1413},{"style":593},[1414],{"type":398,"value":665},{"type":393,"tag":581,"props":1416,"children":1417},{"style":708},[1418],{"type":398,"value":1419},"8",{"type":393,"tag":581,"props":1421,"children":1422},{"style":593},[1423],{"type":398,"value":693},{"type":393,"tag":581,"props":1425,"children":1426},{"class":583,"line":72},[1427,1432,1436,1441,1445,1449,1453,1458,1462,1467],{"type":393,"tag":581,"props":1428,"children":1429},{"style":647},[1430],{"type":398,"value":1431},"    'price'",{"type":393,"tag":581,"props":1433,"children":1434},{"style":593},[1435],{"type":398,"value":655},{"type":393,"tag":581,"props":1437,"children":1438},{"style":708},[1439],{"type":398,"value":1440},"999",{"type":393,"tag":581,"props":1442,"children":1443},{"style":593},[1444],{"type":398,"value":665},{"type":393,"tag":581,"props":1446,"children":1447},{"style":708},[1448],{"type":398,"value":1410},{"type":393,"tag":581,"props":1450,"children":1451},{"style":593},[1452],{"type":398,"value":665},{"type":393,"tag":581,"props":1454,"children":1455},{"style":708},[1456],{"type":398,"value":1457},"75",{"type":393,"tag":581,"props":1459,"children":1460},{"style":593},[1461],{"type":398,"value":665},{"type":393,"tag":581,"props":1463,"children":1464},{"style":708},[1465],{"type":398,"value":1466},"300",{"type":393,"tag":581,"props":1468,"children":1469},{"style":593},[1470],{"type":398,"value":693},{"type":393,"tag":581,"props":1472,"children":1473},{"class":583,"line":83},[1474,1479,1483,1488,1492,1497,1501,1505,1509,1513],{"type":393,"tag":581,"props":1475,"children":1476},{"style":647},[1477],{"type":398,"value":1478},"    'category'",{"type":393,"tag":581,"props":1480,"children":1481},{"style":593},[1482],{"type":398,"value":655},{"type":393,"tag":581,"props":1484,"children":1485},{"style":647},[1486],{"type":398,"value":1487},"'Computer'",{"type":393,"tag":581,"props":1489,"children":1490},{"style":593},[1491],{"type":398,"value":665},{"type":393,"tag":581,"props":1493,"children":1494},{"style":647},[1495],{"type":398,"value":1496},"'Accessory'",{"type":393,"tag":581,"props":1498,"children":1499},{"style":593},[1500],{"type":398,"value":665},{"type":393,"tag":581,"props":1502,"children":1503},{"style":647},[1504],{"type":398,"value":1496},{"type":393,"tag":581,"props":1506,"children":1507},{"style":593},[1508],{"type":398,"value":665},{"type":393,"tag":581,"props":1510,"children":1511},{"style":647},[1512],{"type":398,"value":1487},{"type":393,"tag":581,"props":1514,"children":1515},{"style":593},[1516],{"type":398,"value":834},{"type":393,"tag":581,"props":1518,"children":1519},{"class":583,"line":92},[1520],{"type":393,"tag":581,"props":1521,"children":1522},{"style":593},[1523],{"type":398,"value":842},{"type":393,"tag":581,"props":1525,"children":1526},{"class":583,"line":101},[1527],{"type":393,"tag":581,"props":1528,"children":1529},{"emptyLinePlaceholder":12},[1530],{"type":398,"value":614},{"type":393,"tag":581,"props":1532,"children":1533},{"class":583,"line":110},[1534,1538,1542,1547],{"type":393,"tag":581,"props":1535,"children":1536},{"style":708},[1537],{"type":398,"value":857},{"type":393,"tag":581,"props":1539,"children":1540},{"style":593},[1541],{"type":398,"value":862},{"type":393,"tag":581,"props":1543,"children":1544},{"style":647},[1545],{"type":398,"value":1546},"\"Product Inventory:\"",{"type":393,"tag":581,"props":1548,"children":1549},{"style":593},[1550],{"type":398,"value":872},{"type":393,"tag":581,"props":1552,"children":1553},{"class":583,"line":121},[1554,1558],{"type":393,"tag":581,"props":1555,"children":1556},{"style":708},[1557],{"type":398,"value":857},{"type":393,"tag":581,"props":1559,"children":1560},{"style":593},[1561],{"type":398,"value":1562},"(inventory)\n",{"type":393,"tag":581,"props":1564,"children":1565},{"class":583,"line":130},[1566,1570],{"type":393,"tag":581,"props":1567,"children":1568},{"style":708},[1569],{"type":398,"value":857},{"type":393,"tag":581,"props":1571,"children":1572},{"style":593},[1573],{"type":398,"value":896},{"type":393,"tag":581,"props":1575,"children":1576},{"class":583,"line":139},[1577],{"type":393,"tag":581,"props":1578,"children":1579},{"emptyLinePlaceholder":12},[1580],{"type":398,"value":614},{"type":393,"tag":581,"props":1582,"children":1583},{"class":583,"line":148},[1584,1588,1592,1597],{"type":393,"tag":581,"props":1585,"children":1586},{"style":708},[1587],{"type":398,"value":857},{"type":393,"tag":581,"props":1589,"children":1590},{"style":593},[1591],{"type":398,"value":862},{"type":393,"tag":581,"props":1593,"children":1594},{"style":647},[1595],{"type":398,"value":1596},"\"🏷️ loc Examples (Label-based):\"",{"type":393,"tag":581,"props":1598,"children":1599},{"style":593},[1600],{"type":398,"value":872},{"type":393,"tag":581,"props":1602,"children":1603},{"class":583,"line":159},[1604,1608],{"type":393,"tag":581,"props":1605,"children":1606},{"style":708},[1607],{"type":398,"value":857},{"type":393,"tag":581,"props":1609,"children":1610},{"style":593},[1611],{"type":398,"value":896},{"type":393,"tag":581,"props":1613,"children":1614},{"class":583,"line":168},[1615],{"type":393,"tag":581,"props":1616,"children":1617},{"emptyLinePlaceholder":12},[1618],{"type":398,"value":614},{"type":393,"tag":581,"props":1620,"children":1621},{"class":583,"line":177},[1622],{"type":393,"tag":581,"props":1623,"children":1624},{"style":620},[1625],{"type":398,"value":1626},"# Single cell - row 0, column 'product'\n",{"type":393,"tag":581,"props":1628,"children":1629},{"class":583,"line":186},[1630,1634,1638,1643],{"type":393,"tag":581,"props":1631,"children":1632},{"style":708},[1633],{"type":398,"value":857},{"type":393,"tag":581,"props":1635,"children":1636},{"style":593},[1637],{"type":398,"value":862},{"type":393,"tag":581,"props":1639,"children":1640},{"style":647},[1641],{"type":398,"value":1642},"\"1️⃣ First product name:\"",{"type":393,"tag":581,"props":1644,"children":1645},{"style":593},[1646],{"type":398,"value":872},{"type":393,"tag":581,"props":1648,"children":1649},{"class":583,"line":197},[1650,1654,1659,1663,1667,1672],{"type":393,"tag":581,"props":1651,"children":1652},{"style":708},[1653],{"type":398,"value":857},{"type":393,"tag":581,"props":1655,"children":1656},{"style":593},[1657],{"type":398,"value":1658},"(inventory.loc[",{"type":393,"tag":581,"props":1660,"children":1661},{"style":708},[1662],{"type":398,"value":986},{"type":393,"tag":581,"props":1664,"children":1665},{"style":593},[1666],{"type":398,"value":665},{"type":393,"tag":581,"props":1668,"children":1669},{"style":647},[1670],{"type":398,"value":1671},"'product'",{"type":393,"tag":581,"props":1673,"children":1674},{"style":593},[1675],{"type":398,"value":1071},{"type":393,"tag":581,"props":1677,"children":1678},{"class":583,"line":206},[1679,1683],{"type":393,"tag":581,"props":1680,"children":1681},{"style":708},[1682],{"type":398,"value":857},{"type":393,"tag":581,"props":1684,"children":1685},{"style":593},[1686],{"type":398,"value":896},{"type":393,"tag":581,"props":1688,"children":1689},{"class":583,"line":215},[1690],{"type":393,"tag":581,"props":1691,"children":1692},{"emptyLinePlaceholder":12},[1693],{"type":398,"value":614},{"type":393,"tag":581,"props":1695,"children":1696},{"class":583,"line":224},[1697],{"type":393,"tag":581,"props":1698,"children":1699},{"style":620},[1700],{"type":398,"value":1031},{"type":393,"tag":581,"props":1702,"children":1703},{"class":583,"line":233},[1704,1708,1712,1717],{"type":393,"tag":581,"props":1705,"children":1706},{"style":708},[1707],{"type":398,"value":857},{"type":393,"tag":581,"props":1709,"children":1710},{"style":593},[1711],{"type":398,"value":862},{"type":393,"tag":581,"props":1713,"children":1714},{"style":647},[1715],{"type":398,"value":1716},"\"2️⃣ Mouse details (row 1):\"",{"type":393,"tag":581,"props":1718,"children":1719},{"style":593},[1720],{"type":398,"value":872},{"type":393,"tag":581,"props":1722,"children":1723},{"class":583,"line":244},[1724,1728,1732,1736],{"type":393,"tag":581,"props":1725,"children":1726},{"style":708},[1727],{"type":398,"value":857},{"type":393,"tag":581,"props":1729,"children":1730},{"style":593},[1731],{"type":398,"value":1658},{"type":393,"tag":581,"props":1733,"children":1734},{"style":708},[1735],{"type":398,"value":995},{"type":393,"tag":581,"props":1737,"children":1738},{"style":593},[1739],{"type":398,"value":1071},{"type":393,"tag":581,"props":1741,"children":1742},{"class":583,"line":253},[1743,1747],{"type":393,"tag":581,"props":1744,"children":1745},{"style":708},[1746],{"type":398,"value":857},{"type":393,"tag":581,"props":1748,"children":1749},{"style":593},[1750],{"type":398,"value":896},{"type":393,"tag":581,"props":1752,"children":1753},{"class":583,"line":262},[1754],{"type":393,"tag":581,"props":1755,"children":1756},{"emptyLinePlaceholder":12},[1757],{"type":398,"value":614},{"type":393,"tag":581,"props":1759,"children":1760},{"class":583,"line":271},[1761],{"type":393,"tag":581,"props":1762,"children":1763},{"style":620},[1764],{"type":398,"value":1765},"# Multiple rows and specific columns\n",{"type":393,"tag":581,"props":1767,"children":1768},{"class":583,"line":281},[1769,1773,1777,1782],{"type":393,"tag":581,"props":1770,"children":1771},{"style":708},[1772],{"type":398,"value":857},{"type":393,"tag":581,"props":1774,"children":1775},{"style":593},[1776],{"type":398,"value":862},{"type":393,"tag":581,"props":1778,"children":1779},{"style":647},[1780],{"type":398,"value":1781},"\"3️⃣ First 2 products, name and price:\"",{"type":393,"tag":581,"props":1783,"children":1784},{"style":593},[1785],{"type":398,"value":872},{"type":393,"tag":581,"props":1787,"children":1788},{"class":583,"line":290},[1789,1793,1797,1801,1805,1809,1814,1818,1822,1827],{"type":393,"tag":581,"props":1790,"children":1791},{"style":708},[1792],{"type":398,"value":857},{"type":393,"tag":581,"props":1794,"children":1795},{"style":593},[1796],{"type":398,"value":1658},{"type":393,"tag":581,"props":1798,"children":1799},{"style":708},[1800],{"type":398,"value":986},{"type":393,"tag":581,"props":1802,"children":1803},{"style":593},[1804],{"type":398,"value":1137},{"type":393,"tag":581,"props":1806,"children":1807},{"style":708},[1808],{"type":398,"value":995},{"type":393,"tag":581,"props":1810,"children":1811},{"style":593},[1812],{"type":398,"value":1813},", [",{"type":393,"tag":581,"props":1815,"children":1816},{"style":647},[1817],{"type":398,"value":1671},{"type":393,"tag":581,"props":1819,"children":1820},{"style":593},[1821],{"type":398,"value":665},{"type":393,"tag":581,"props":1823,"children":1824},{"style":647},[1825],{"type":398,"value":1826},"'price'",{"type":393,"tag":581,"props":1828,"children":1829},{"style":593},[1830],{"type":398,"value":1831},"]])\n",{"type":393,"tag":581,"props":1833,"children":1834},{"class":583,"line":299},[1835,1839],{"type":393,"tag":581,"props":1836,"children":1837},{"style":708},[1838],{"type":398,"value":857},{"type":393,"tag":581,"props":1840,"children":1841},{"style":593},[1842],{"type":398,"value":896},{"type":393,"tag":581,"props":1844,"children":1845},{"class":583,"line":308},[1846],{"type":393,"tag":581,"props":1847,"children":1848},{"emptyLinePlaceholder":12},[1849],{"type":398,"value":614},{"type":393,"tag":581,"props":1851,"children":1852},{"class":583,"line":318},[1853],{"type":393,"tag":581,"props":1854,"children":1855},{"style":620},[1856],{"type":398,"value":1857},"# Range of columns\n",{"type":393,"tag":581,"props":1859,"children":1860},{"class":583,"line":327},[1861,1865,1869,1874],{"type":393,"tag":581,"props":1862,"children":1863},{"style":708},[1864],{"type":398,"value":857},{"type":393,"tag":581,"props":1866,"children":1867},{"style":593},[1868],{"type":398,"value":862},{"type":393,"tag":581,"props":1870,"children":1871},{"style":647},[1872],{"type":398,"value":1873},"\"4️⃣ All products, stock to price:\"",{"type":393,"tag":581,"props":1875,"children":1876},{"style":593},[1877],{"type":398,"value":872},{"type":393,"tag":581,"props":1879,"children":1880},{"class":583,"line":336},[1881,1885,1890,1895,1899,1903],{"type":393,"tag":581,"props":1882,"children":1883},{"style":708},[1884],{"type":398,"value":857},{"type":393,"tag":581,"props":1886,"children":1887},{"style":593},[1888],{"type":398,"value":1889},"(inventory.loc[:, ",{"type":393,"tag":581,"props":1891,"children":1892},{"style":647},[1893],{"type":398,"value":1894},"'stock'",{"type":393,"tag":581,"props":1896,"children":1897},{"style":593},[1898],{"type":398,"value":1137},{"type":393,"tag":581,"props":1900,"children":1901},{"style":647},[1902],{"type":398,"value":1826},{"type":393,"tag":581,"props":1904,"children":1905},{"style":593},[1906],{"type":398,"value":1071},{"type":393,"tag":550,"props":1908,"children":1910},{"id":1909},"when-to-use-loc-vs-iloc",[1911],{"type":398,"value":1912},"🎯 When to Use loc vs iloc",{"type":393,"tag":401,"props":1914,"children":1915},{},[1916],{"type":398,"value":1917},"Different situations call for different tools:",{"type":393,"tag":567,"props":1919,"children":1920},{},[1921],{"type":393,"tag":571,"props":1922,"children":1924},{"className":573,"code":1923,"language":575,"meta":6,"style":6},"import pandas as pd\n\n# Sales data\nsales = pd.DataFrame({\n    'month': ['Jan', 'Feb', 'Mar', 'Apr'],\n    'revenue': [10000, 12000, 15000, 11000],\n    'expenses': [7000, 8000, 9000, 7500],\n    'profit': [3000, 4000, 6000, 3500]\n})\n\nprint(\"Sales Data:\")\nprint(sales)\nprint()\n\nprint(\"🎯 When to Use Each:\")\nprint()\n\nprint(\"✅ Use iloc when you know positions:\")\nprint(\"Last 2 months (positions -2 to end):\")\nprint(sales.iloc[-2:])\nprint()\n\nprint(\"✅ Use loc when you know names:\")\nprint(\"Revenue and profit columns:\")\nprint(sales.loc[:, ['revenue', 'profit']])\nprint()\n\nprint(\"✅ Use iloc for consistent patterns:\")\nprint(\"Every other row (0, 2):\")\nprint(sales.iloc[::2])\nprint()\n\nprint(\"✅ Use loc for meaningful selection:\")\nprint(\"Q1 data (first 3 months), financial columns:\")\nprint(sales.loc[0:2, 'revenue':'profit'])\n",[1925],{"type":393,"tag":405,"props":1926,"children":1927},{"__ignoreMap":6},[1928,1947,1954,1962,1978,2026,2074,2122,2170,2177,2184,2204,2216,2227,2234,2254,2265,2272,2292,2312,2338,2349,2356,2376,2396,2426,2437,2444,2464,2484,2504,2515,2522,2542,2562],{"type":393,"tag":581,"props":1929,"children":1930},{"class":583,"line":11},[1931,1935,1939,1943],{"type":393,"tag":581,"props":1932,"children":1933},{"style":587},[1934],{"type":398,"value":590},{"type":393,"tag":581,"props":1936,"children":1937},{"style":593},[1938],{"type":398,"value":596},{"type":393,"tag":581,"props":1940,"children":1941},{"style":587},[1942],{"type":398,"value":601},{"type":393,"tag":581,"props":1944,"children":1945},{"style":593},[1946],{"type":398,"value":606},{"type":393,"tag":581,"props":1948,"children":1949},{"class":583,"line":27},[1950],{"type":393,"tag":581,"props":1951,"children":1952},{"emptyLinePlaceholder":12},[1953],{"type":398,"value":614},{"type":393,"tag":581,"props":1955,"children":1956},{"class":583,"line":36},[1957],{"type":393,"tag":581,"props":1958,"children":1959},{"style":620},[1960],{"type":398,"value":1961},"# Sales data\n",{"type":393,"tag":581,"props":1963,"children":1964},{"class":583,"line":45},[1965,1970,1974],{"type":393,"tag":581,"props":1966,"children":1967},{"style":593},[1968],{"type":398,"value":1969},"sales ",{"type":393,"tag":581,"props":1971,"children":1972},{"style":587},[1973],{"type":398,"value":636},{"type":393,"tag":581,"props":1975,"children":1976},{"style":593},[1977],{"type":398,"value":641},{"type":393,"tag":581,"props":1979,"children":1980},{"class":583,"line":54},[1981,1986,1990,1995,1999,2004,2008,2013,2017,2022],{"type":393,"tag":581,"props":1982,"children":1983},{"style":647},[1984],{"type":398,"value":1985},"    'month'",{"type":393,"tag":581,"props":1987,"children":1988},{"style":593},[1989],{"type":398,"value":655},{"type":393,"tag":581,"props":1991,"children":1992},{"style":647},[1993],{"type":398,"value":1994},"'Jan'",{"type":393,"tag":581,"props":1996,"children":1997},{"style":593},[1998],{"type":398,"value":665},{"type":393,"tag":581,"props":2000,"children":2001},{"style":647},[2002],{"type":398,"value":2003},"'Feb'",{"type":393,"tag":581,"props":2005,"children":2006},{"style":593},[2007],{"type":398,"value":665},{"type":393,"tag":581,"props":2009,"children":2010},{"style":647},[2011],{"type":398,"value":2012},"'Mar'",{"type":393,"tag":581,"props":2014,"children":2015},{"style":593},[2016],{"type":398,"value":665},{"type":393,"tag":581,"props":2018,"children":2019},{"style":647},[2020],{"type":398,"value":2021},"'Apr'",{"type":393,"tag":581,"props":2023,"children":2024},{"style":593},[2025],{"type":398,"value":693},{"type":393,"tag":581,"props":2027,"children":2028},{"class":583,"line":63},[2029,2034,2038,2043,2047,2052,2056,2061,2065,2070],{"type":393,"tag":581,"props":2030,"children":2031},{"style":647},[2032],{"type":398,"value":2033},"    'revenue'",{"type":393,"tag":581,"props":2035,"children":2036},{"style":593},[2037],{"type":398,"value":655},{"type":393,"tag":581,"props":2039,"children":2040},{"style":708},[2041],{"type":398,"value":2042},"10000",{"type":393,"tag":581,"props":2044,"children":2045},{"style":593},[2046],{"type":398,"value":665},{"type":393,"tag":581,"props":2048,"children":2049},{"style":708},[2050],{"type":398,"value":2051},"12000",{"type":393,"tag":581,"props":2053,"children":2054},{"style":593},[2055],{"type":398,"value":665},{"type":393,"tag":581,"props":2057,"children":2058},{"style":708},[2059],{"type":398,"value":2060},"15000",{"type":393,"tag":581,"props":2062,"children":2063},{"style":593},[2064],{"type":398,"value":665},{"type":393,"tag":581,"props":2066,"children":2067},{"style":708},[2068],{"type":398,"value":2069},"11000",{"type":393,"tag":581,"props":2071,"children":2072},{"style":593},[2073],{"type":398,"value":693},{"type":393,"tag":581,"props":2075,"children":2076},{"class":583,"line":72},[2077,2082,2086,2091,2095,2100,2104,2109,2113,2118],{"type":393,"tag":581,"props":2078,"children":2079},{"style":647},[2080],{"type":398,"value":2081},"    'expenses'",{"type":393,"tag":581,"props":2083,"children":2084},{"style":593},[2085],{"type":398,"value":655},{"type":393,"tag":581,"props":2087,"children":2088},{"style":708},[2089],{"type":398,"value":2090},"7000",{"type":393,"tag":581,"props":2092,"children":2093},{"style":593},[2094],{"type":398,"value":665},{"type":393,"tag":581,"props":2096,"children":2097},{"style":708},[2098],{"type":398,"value":2099},"8000",{"type":393,"tag":581,"props":2101,"children":2102},{"style":593},[2103],{"type":398,"value":665},{"type":393,"tag":581,"props":2105,"children":2106},{"style":708},[2107],{"type":398,"value":2108},"9000",{"type":393,"tag":581,"props":2110,"children":2111},{"style":593},[2112],{"type":398,"value":665},{"type":393,"tag":581,"props":2114,"children":2115},{"style":708},[2116],{"type":398,"value":2117},"7500",{"type":393,"tag":581,"props":2119,"children":2120},{"style":593},[2121],{"type":398,"value":693},{"type":393,"tag":581,"props":2123,"children":2124},{"class":583,"line":83},[2125,2130,2134,2139,2143,2148,2152,2157,2161,2166],{"type":393,"tag":581,"props":2126,"children":2127},{"style":647},[2128],{"type":398,"value":2129},"    'profit'",{"type":393,"tag":581,"props":2131,"children":2132},{"style":593},[2133],{"type":398,"value":655},{"type":393,"tag":581,"props":2135,"children":2136},{"style":708},[2137],{"type":398,"value":2138},"3000",{"type":393,"tag":581,"props":2140,"children":2141},{"style":593},[2142],{"type":398,"value":665},{"type":393,"tag":581,"props":2144,"children":2145},{"style":708},[2146],{"type":398,"value":2147},"4000",{"type":393,"tag":581,"props":2149,"children":2150},{"style":593},[2151],{"type":398,"value":665},{"type":393,"tag":581,"props":2153,"children":2154},{"style":708},[2155],{"type":398,"value":2156},"6000",{"type":393,"tag":581,"props":2158,"children":2159},{"style":593},[2160],{"type":398,"value":665},{"type":393,"tag":581,"props":2162,"children":2163},{"style":708},[2164],{"type":398,"value":2165},"3500",{"type":393,"tag":581,"props":2167,"children":2168},{"style":593},[2169],{"type":398,"value":834},{"type":393,"tag":581,"props":2171,"children":2172},{"class":583,"line":92},[2173],{"type":393,"tag":581,"props":2174,"children":2175},{"style":593},[2176],{"type":398,"value":842},{"type":393,"tag":581,"props":2178,"children":2179},{"class":583,"line":101},[2180],{"type":393,"tag":581,"props":2181,"children":2182},{"emptyLinePlaceholder":12},[2183],{"type":398,"value":614},{"type":393,"tag":581,"props":2185,"children":2186},{"class":583,"line":110},[2187,2191,2195,2200],{"type":393,"tag":581,"props":2188,"children":2189},{"style":708},[2190],{"type":398,"value":857},{"type":393,"tag":581,"props":2192,"children":2193},{"style":593},[2194],{"type":398,"value":862},{"type":393,"tag":581,"props":2196,"children":2197},{"style":647},[2198],{"type":398,"value":2199},"\"Sales Data:\"",{"type":393,"tag":581,"props":2201,"children":2202},{"style":593},[2203],{"type":398,"value":872},{"type":393,"tag":581,"props":2205,"children":2206},{"class":583,"line":121},[2207,2211],{"type":393,"tag":581,"props":2208,"children":2209},{"style":708},[2210],{"type":398,"value":857},{"type":393,"tag":581,"props":2212,"children":2213},{"style":593},[2214],{"type":398,"value":2215},"(sales)\n",{"type":393,"tag":581,"props":2217,"children":2218},{"class":583,"line":130},[2219,2223],{"type":393,"tag":581,"props":2220,"children":2221},{"style":708},[2222],{"type":398,"value":857},{"type":393,"tag":581,"props":2224,"children":2225},{"style":593},[2226],{"type":398,"value":896},{"type":393,"tag":581,"props":2228,"children":2229},{"class":583,"line":139},[2230],{"type":393,"tag":581,"props":2231,"children":2232},{"emptyLinePlaceholder":12},[2233],{"type":398,"value":614},{"type":393,"tag":581,"props":2235,"children":2236},{"class":583,"line":148},[2237,2241,2245,2250],{"type":393,"tag":581,"props":2238,"children":2239},{"style":708},[2240],{"type":398,"value":857},{"type":393,"tag":581,"props":2242,"children":2243},{"style":593},[2244],{"type":398,"value":862},{"type":393,"tag":581,"props":2246,"children":2247},{"style":647},[2248],{"type":398,"value":2249},"\"🎯 When to Use Each:\"",{"type":393,"tag":581,"props":2251,"children":2252},{"style":593},[2253],{"type":398,"value":872},{"type":393,"tag":581,"props":2255,"children":2256},{"class":583,"line":159},[2257,2261],{"type":393,"tag":581,"props":2258,"children":2259},{"style":708},[2260],{"type":398,"value":857},{"type":393,"tag":581,"props":2262,"children":2263},{"style":593},[2264],{"type":398,"value":896},{"type":393,"tag":581,"props":2266,"children":2267},{"class":583,"line":168},[2268],{"type":393,"tag":581,"props":2269,"children":2270},{"emptyLinePlaceholder":12},[2271],{"type":398,"value":614},{"type":393,"tag":581,"props":2273,"children":2274},{"class":583,"line":177},[2275,2279,2283,2288],{"type":393,"tag":581,"props":2276,"children":2277},{"style":708},[2278],{"type":398,"value":857},{"type":393,"tag":581,"props":2280,"children":2281},{"style":593},[2282],{"type":398,"value":862},{"type":393,"tag":581,"props":2284,"children":2285},{"style":647},[2286],{"type":398,"value":2287},"\"✅ Use iloc when you know positions:\"",{"type":393,"tag":581,"props":2289,"children":2290},{"style":593},[2291],{"type":398,"value":872},{"type":393,"tag":581,"props":2293,"children":2294},{"class":583,"line":186},[2295,2299,2303,2308],{"type":393,"tag":581,"props":2296,"children":2297},{"style":708},[2298],{"type":398,"value":857},{"type":393,"tag":581,"props":2300,"children":2301},{"style":593},[2302],{"type":398,"value":862},{"type":393,"tag":581,"props":2304,"children":2305},{"style":647},[2306],{"type":398,"value":2307},"\"Last 2 months (positions -2 to end):\"",{"type":393,"tag":581,"props":2309,"children":2310},{"style":593},[2311],{"type":398,"value":872},{"type":393,"tag":581,"props":2313,"children":2314},{"class":583,"line":197},[2315,2319,2324,2329,2333],{"type":393,"tag":581,"props":2316,"children":2317},{"style":708},[2318],{"type":398,"value":857},{"type":393,"tag":581,"props":2320,"children":2321},{"style":593},[2322],{"type":398,"value":2323},"(sales.iloc[",{"type":393,"tag":581,"props":2325,"children":2326},{"style":587},[2327],{"type":398,"value":2328},"-",{"type":393,"tag":581,"props":2330,"children":2331},{"style":708},[2332],{"type":398,"value":1142},{"type":393,"tag":581,"props":2334,"children":2335},{"style":593},[2336],{"type":398,"value":2337},":])\n",{"type":393,"tag":581,"props":2339,"children":2340},{"class":583,"line":206},[2341,2345],{"type":393,"tag":581,"props":2342,"children":2343},{"style":708},[2344],{"type":398,"value":857},{"type":393,"tag":581,"props":2346,"children":2347},{"style":593},[2348],{"type":398,"value":896},{"type":393,"tag":581,"props":2350,"children":2351},{"class":583,"line":215},[2352],{"type":393,"tag":581,"props":2353,"children":2354},{"emptyLinePlaceholder":12},[2355],{"type":398,"value":614},{"type":393,"tag":581,"props":2357,"children":2358},{"class":583,"line":224},[2359,2363,2367,2372],{"type":393,"tag":581,"props":2360,"children":2361},{"style":708},[2362],{"type":398,"value":857},{"type":393,"tag":581,"props":2364,"children":2365},{"style":593},[2366],{"type":398,"value":862},{"type":393,"tag":581,"props":2368,"children":2369},{"style":647},[2370],{"type":398,"value":2371},"\"✅ Use loc when you know names:\"",{"type":393,"tag":581,"props":2373,"children":2374},{"style":593},[2375],{"type":398,"value":872},{"type":393,"tag":581,"props":2377,"children":2378},{"class":583,"line":233},[2379,2383,2387,2392],{"type":393,"tag":581,"props":2380,"children":2381},{"style":708},[2382],{"type":398,"value":857},{"type":393,"tag":581,"props":2384,"children":2385},{"style":593},[2386],{"type":398,"value":862},{"type":393,"tag":581,"props":2388,"children":2389},{"style":647},[2390],{"type":398,"value":2391},"\"Revenue and profit columns:\"",{"type":393,"tag":581,"props":2393,"children":2394},{"style":593},[2395],{"type":398,"value":872},{"type":393,"tag":581,"props":2397,"children":2398},{"class":583,"line":244},[2399,2403,2408,2413,2417,2422],{"type":393,"tag":581,"props":2400,"children":2401},{"style":708},[2402],{"type":398,"value":857},{"type":393,"tag":581,"props":2404,"children":2405},{"style":593},[2406],{"type":398,"value":2407},"(sales.loc[:, [",{"type":393,"tag":581,"props":2409,"children":2410},{"style":647},[2411],{"type":398,"value":2412},"'revenue'",{"type":393,"tag":581,"props":2414,"children":2415},{"style":593},[2416],{"type":398,"value":665},{"type":393,"tag":581,"props":2418,"children":2419},{"style":647},[2420],{"type":398,"value":2421},"'profit'",{"type":393,"tag":581,"props":2423,"children":2424},{"style":593},[2425],{"type":398,"value":1831},{"type":393,"tag":581,"props":2427,"children":2428},{"class":583,"line":253},[2429,2433],{"type":393,"tag":581,"props":2430,"children":2431},{"style":708},[2432],{"type":398,"value":857},{"type":393,"tag":581,"props":2434,"children":2435},{"style":593},[2436],{"type":398,"value":896},{"type":393,"tag":581,"props":2438,"children":2439},{"class":583,"line":262},[2440],{"type":393,"tag":581,"props":2441,"children":2442},{"emptyLinePlaceholder":12},[2443],{"type":398,"value":614},{"type":393,"tag":581,"props":2445,"children":2446},{"class":583,"line":271},[2447,2451,2455,2460],{"type":393,"tag":581,"props":2448,"children":2449},{"style":708},[2450],{"type":398,"value":857},{"type":393,"tag":581,"props":2452,"children":2453},{"style":593},[2454],{"type":398,"value":862},{"type":393,"tag":581,"props":2456,"children":2457},{"style":647},[2458],{"type":398,"value":2459},"\"✅ Use iloc for consistent patterns:\"",{"type":393,"tag":581,"props":2461,"children":2462},{"style":593},[2463],{"type":398,"value":872},{"type":393,"tag":581,"props":2465,"children":2466},{"class":583,"line":281},[2467,2471,2475,2480],{"type":393,"tag":581,"props":2468,"children":2469},{"style":708},[2470],{"type":398,"value":857},{"type":393,"tag":581,"props":2472,"children":2473},{"style":593},[2474],{"type":398,"value":862},{"type":393,"tag":581,"props":2476,"children":2477},{"style":647},[2478],{"type":398,"value":2479},"\"Every other row (0, 2):\"",{"type":393,"tag":581,"props":2481,"children":2482},{"style":593},[2483],{"type":398,"value":872},{"type":393,"tag":581,"props":2485,"children":2486},{"class":583,"line":290},[2487,2491,2496,2500],{"type":393,"tag":581,"props":2488,"children":2489},{"style":708},[2490],{"type":398,"value":857},{"type":393,"tag":581,"props":2492,"children":2493},{"style":593},[2494],{"type":398,"value":2495},"(sales.iloc[::",{"type":393,"tag":581,"props":2497,"children":2498},{"style":708},[2499],{"type":398,"value":1142},{"type":393,"tag":581,"props":2501,"children":2502},{"style":593},[2503],{"type":398,"value":1071},{"type":393,"tag":581,"props":2505,"children":2506},{"class":583,"line":299},[2507,2511],{"type":393,"tag":581,"props":2508,"children":2509},{"style":708},[2510],{"type":398,"value":857},{"type":393,"tag":581,"props":2512,"children":2513},{"style":593},[2514],{"type":398,"value":896},{"type":393,"tag":581,"props":2516,"children":2517},{"class":583,"line":308},[2518],{"type":393,"tag":581,"props":2519,"children":2520},{"emptyLinePlaceholder":12},[2521],{"type":398,"value":614},{"type":393,"tag":581,"props":2523,"children":2524},{"class":583,"line":318},[2525,2529,2533,2538],{"type":393,"tag":581,"props":2526,"children":2527},{"style":708},[2528],{"type":398,"value":857},{"type":393,"tag":581,"props":2530,"children":2531},{"style":593},[2532],{"type":398,"value":862},{"type":393,"tag":581,"props":2534,"children":2535},{"style":647},[2536],{"type":398,"value":2537},"\"✅ Use loc for meaningful selection:\"",{"type":393,"tag":581,"props":2539,"children":2540},{"style":593},[2541],{"type":398,"value":872},{"type":393,"tag":581,"props":2543,"children":2544},{"class":583,"line":327},[2545,2549,2553,2558],{"type":393,"tag":581,"props":2546,"children":2547},{"style":708},[2548],{"type":398,"value":857},{"type":393,"tag":581,"props":2550,"children":2551},{"style":593},[2552],{"type":398,"value":862},{"type":393,"tag":581,"props":2554,"children":2555},{"style":647},[2556],{"type":398,"value":2557},"\"Q1 data (first 3 months), financial columns:\"",{"type":393,"tag":581,"props":2559,"children":2560},{"style":593},[2561],{"type":398,"value":872},{"type":393,"tag":581,"props":2563,"children":2564},{"class":583,"line":336},[2565,2569,2574,2578,2582,2586,2590,2594,2598,2602],{"type":393,"tag":581,"props":2566,"children":2567},{"style":708},[2568],{"type":398,"value":857},{"type":393,"tag":581,"props":2570,"children":2571},{"style":593},[2572],{"type":398,"value":2573},"(sales.loc[",{"type":393,"tag":581,"props":2575,"children":2576},{"style":708},[2577],{"type":398,"value":986},{"type":393,"tag":581,"props":2579,"children":2580},{"style":593},[2581],{"type":398,"value":1137},{"type":393,"tag":581,"props":2583,"children":2584},{"style":708},[2585],{"type":398,"value":1142},{"type":393,"tag":581,"props":2587,"children":2588},{"style":593},[2589],{"type":398,"value":665},{"type":393,"tag":581,"props":2591,"children":2592},{"style":647},[2593],{"type":398,"value":2412},{"type":393,"tag":581,"props":2595,"children":2596},{"style":593},[2597],{"type":398,"value":1137},{"type":393,"tag":581,"props":2599,"children":2600},{"style":647},[2601],{"type":398,"value":2421},{"type":393,"tag":581,"props":2603,"children":2604},{"style":593},[2605],{"type":398,"value":1071},{"type":393,"tag":550,"props":2607,"children":2609},{"id":2608},"selecting-ranges",[2610],{"type":398,"value":2611},"📊 Selecting Ranges",{"type":393,"tag":401,"props":2613,"children":2614},{},[2615],{"type":398,"value":2616},"Both loc and iloc can select ranges, but they work differently:",{"type":393,"tag":567,"props":2618,"children":2619},{},[2620],{"type":393,"tag":571,"props":2621,"children":2623},{"className":573,"code":2622,"language":575,"meta":6,"style":6},"import pandas as pd\n\n# Employee data\nemployees = pd.DataFrame({\n    'name': ['Alice', 'Bob', 'Charlie', 'Diana', 'Eve'],\n    'age': [25, 30, 35, 28, 32],\n    'department': ['Sales', 'IT', 'HR', 'Sales', 'IT'],\n    'salary': [50000, 75000, 60000, 52000, 78000]\n})\n\nprint(\"Employee Data:\")\nprint(employees)\nprint()\n\nprint(\"📊 Range Selection:\")\nprint()\n\nprint(\"iloc ranges (position-based):\")\nprint(\"Rows 1-3, columns 1-2:\")\nprint(employees.iloc[1:4, 1:3])  # Excludes end position\nprint()\n\nprint(\"loc ranges (label-based):\")\nprint(\"Rows 1-3, age to department:\")\nprint(employees.loc[1:3, 'age':'department'])  # Includes end label\nprint()\n\nprint(\"💡 Key Difference:\")\nprint(\"iloc[1:4] = positions 1, 2, 3 (excludes 4)\")\nprint(\"loc[1:3] = indices 1, 2, 3 (includes 3)\")\n",[2624],{"type":393,"tag":405,"props":2625,"children":2626},{"__ignoreMap":6},[2627,2646,2653,2661,2677,2729,2785,2840,2897,2904,2911,2931,2943,2954,2961,2981,2992,2999,3019,3039,3089,3100,3107,3127,3147,3198,3209,3216,3236,3256],{"type":393,"tag":581,"props":2628,"children":2629},{"class":583,"line":11},[2630,2634,2638,2642],{"type":393,"tag":581,"props":2631,"children":2632},{"style":587},[2633],{"type":398,"value":590},{"type":393,"tag":581,"props":2635,"children":2636},{"style":593},[2637],{"type":398,"value":596},{"type":393,"tag":581,"props":2639,"children":2640},{"style":587},[2641],{"type":398,"value":601},{"type":393,"tag":581,"props":2643,"children":2644},{"style":593},[2645],{"type":398,"value":606},{"type":393,"tag":581,"props":2647,"children":2648},{"class":583,"line":27},[2649],{"type":393,"tag":581,"props":2650,"children":2651},{"emptyLinePlaceholder":12},[2652],{"type":398,"value":614},{"type":393,"tag":581,"props":2654,"children":2655},{"class":583,"line":36},[2656],{"type":393,"tag":581,"props":2657,"children":2658},{"style":620},[2659],{"type":398,"value":2660},"# Employee data\n",{"type":393,"tag":581,"props":2662,"children":2663},{"class":583,"line":45},[2664,2669,2673],{"type":393,"tag":581,"props":2665,"children":2666},{"style":593},[2667],{"type":398,"value":2668},"employees ",{"type":393,"tag":581,"props":2670,"children":2671},{"style":587},[2672],{"type":398,"value":636},{"type":393,"tag":581,"props":2674,"children":2675},{"style":593},[2676],{"type":398,"value":641},{"type":393,"tag":581,"props":2678,"children":2679},{"class":583,"line":54},[2680,2684,2688,2692,2696,2700,2704,2708,2712,2716,2720,2725],{"type":393,"tag":581,"props":2681,"children":2682},{"style":647},[2683],{"type":398,"value":650},{"type":393,"tag":581,"props":2685,"children":2686},{"style":593},[2687],{"type":398,"value":655},{"type":393,"tag":581,"props":2689,"children":2690},{"style":647},[2691],{"type":398,"value":660},{"type":393,"tag":581,"props":2693,"children":2694},{"style":593},[2695],{"type":398,"value":665},{"type":393,"tag":581,"props":2697,"children":2698},{"style":647},[2699],{"type":398,"value":670},{"type":393,"tag":581,"props":2701,"children":2702},{"style":593},[2703],{"type":398,"value":665},{"type":393,"tag":581,"props":2705,"children":2706},{"style":647},[2707],{"type":398,"value":679},{"type":393,"tag":581,"props":2709,"children":2710},{"style":593},[2711],{"type":398,"value":665},{"type":393,"tag":581,"props":2713,"children":2714},{"style":647},[2715],{"type":398,"value":688},{"type":393,"tag":581,"props":2717,"children":2718},{"style":593},[2719],{"type":398,"value":665},{"type":393,"tag":581,"props":2721,"children":2722},{"style":647},[2723],{"type":398,"value":2724},"'Eve'",{"type":393,"tag":581,"props":2726,"children":2727},{"style":593},[2728],{"type":398,"value":693},{"type":393,"tag":581,"props":2730,"children":2731},{"class":583,"line":63},[2732,2737,2741,2745,2749,2754,2758,2763,2767,2772,2776,2781],{"type":393,"tag":581,"props":2733,"children":2734},{"style":647},[2735],{"type":398,"value":2736},"    'age'",{"type":393,"tag":581,"props":2738,"children":2739},{"style":593},[2740],{"type":398,"value":655},{"type":393,"tag":581,"props":2742,"children":2743},{"style":708},[2744],{"type":398,"value":1410},{"type":393,"tag":581,"props":2746,"children":2747},{"style":593},[2748],{"type":398,"value":665},{"type":393,"tag":581,"props":2750,"children":2751},{"style":708},[2752],{"type":398,"value":2753},"30",{"type":393,"tag":581,"props":2755,"children":2756},{"style":593},[2757],{"type":398,"value":665},{"type":393,"tag":581,"props":2759,"children":2760},{"style":708},[2761],{"type":398,"value":2762},"35",{"type":393,"tag":581,"props":2764,"children":2765},{"style":593},[2766],{"type":398,"value":665},{"type":393,"tag":581,"props":2768,"children":2769},{"style":708},[2770],{"type":398,"value":2771},"28",{"type":393,"tag":581,"props":2773,"children":2774},{"style":593},[2775],{"type":398,"value":665},{"type":393,"tag":581,"props":2777,"children":2778},{"style":708},[2779],{"type":398,"value":2780},"32",{"type":393,"tag":581,"props":2782,"children":2783},{"style":593},[2784],{"type":398,"value":693},{"type":393,"tag":581,"props":2786,"children":2787},{"class":583,"line":72},[2788,2793,2797,2802,2806,2811,2815,2820,2824,2828,2832,2836],{"type":393,"tag":581,"props":2789,"children":2790},{"style":647},[2791],{"type":398,"value":2792},"    'department'",{"type":393,"tag":581,"props":2794,"children":2795},{"style":593},[2796],{"type":398,"value":655},{"type":393,"tag":581,"props":2798,"children":2799},{"style":647},[2800],{"type":398,"value":2801},"'Sales'",{"type":393,"tag":581,"props":2803,"children":2804},{"style":593},[2805],{"type":398,"value":665},{"type":393,"tag":581,"props":2807,"children":2808},{"style":647},[2809],{"type":398,"value":2810},"'IT'",{"type":393,"tag":581,"props":2812,"children":2813},{"style":593},[2814],{"type":398,"value":665},{"type":393,"tag":581,"props":2816,"children":2817},{"style":647},[2818],{"type":398,"value":2819},"'HR'",{"type":393,"tag":581,"props":2821,"children":2822},{"style":593},[2823],{"type":398,"value":665},{"type":393,"tag":581,"props":2825,"children":2826},{"style":647},[2827],{"type":398,"value":2801},{"type":393,"tag":581,"props":2829,"children":2830},{"style":593},[2831],{"type":398,"value":665},{"type":393,"tag":581,"props":2833,"children":2834},{"style":647},[2835],{"type":398,"value":2810},{"type":393,"tag":581,"props":2837,"children":2838},{"style":593},[2839],{"type":398,"value":693},{"type":393,"tag":581,"props":2841,"children":2842},{"class":583,"line":83},[2843,2848,2852,2857,2861,2866,2870,2875,2879,2884,2888,2893],{"type":393,"tag":581,"props":2844,"children":2845},{"style":647},[2846],{"type":398,"value":2847},"    'salary'",{"type":393,"tag":581,"props":2849,"children":2850},{"style":593},[2851],{"type":398,"value":655},{"type":393,"tag":581,"props":2853,"children":2854},{"style":708},[2855],{"type":398,"value":2856},"50000",{"type":393,"tag":581,"props":2858,"children":2859},{"style":593},[2860],{"type":398,"value":665},{"type":393,"tag":581,"props":2862,"children":2863},{"style":708},[2864],{"type":398,"value":2865},"75000",{"type":393,"tag":581,"props":2867,"children":2868},{"style":593},[2869],{"type":398,"value":665},{"type":393,"tag":581,"props":2871,"children":2872},{"style":708},[2873],{"type":398,"value":2874},"60000",{"type":393,"tag":581,"props":2876,"children":2877},{"style":593},[2878],{"type":398,"value":665},{"type":393,"tag":581,"props":2880,"children":2881},{"style":708},[2882],{"type":398,"value":2883},"52000",{"type":393,"tag":581,"props":2885,"children":2886},{"style":593},[2887],{"type":398,"value":665},{"type":393,"tag":581,"props":2889,"children":2890},{"style":708},[2891],{"type":398,"value":2892},"78000",{"type":393,"tag":581,"props":2894,"children":2895},{"style":593},[2896],{"type":398,"value":834},{"type":393,"tag":581,"props":2898,"children":2899},{"class":583,"line":92},[2900],{"type":393,"tag":581,"props":2901,"children":2902},{"style":593},[2903],{"type":398,"value":842},{"type":393,"tag":581,"props":2905,"children":2906},{"class":583,"line":101},[2907],{"type":393,"tag":581,"props":2908,"children":2909},{"emptyLinePlaceholder":12},[2910],{"type":398,"value":614},{"type":393,"tag":581,"props":2912,"children":2913},{"class":583,"line":110},[2914,2918,2922,2927],{"type":393,"tag":581,"props":2915,"children":2916},{"style":708},[2917],{"type":398,"value":857},{"type":393,"tag":581,"props":2919,"children":2920},{"style":593},[2921],{"type":398,"value":862},{"type":393,"tag":581,"props":2923,"children":2924},{"style":647},[2925],{"type":398,"value":2926},"\"Employee Data:\"",{"type":393,"tag":581,"props":2928,"children":2929},{"style":593},[2930],{"type":398,"value":872},{"type":393,"tag":581,"props":2932,"children":2933},{"class":583,"line":121},[2934,2938],{"type":393,"tag":581,"props":2935,"children":2936},{"style":708},[2937],{"type":398,"value":857},{"type":393,"tag":581,"props":2939,"children":2940},{"style":593},[2941],{"type":398,"value":2942},"(employees)\n",{"type":393,"tag":581,"props":2944,"children":2945},{"class":583,"line":130},[2946,2950],{"type":393,"tag":581,"props":2947,"children":2948},{"style":708},[2949],{"type":398,"value":857},{"type":393,"tag":581,"props":2951,"children":2952},{"style":593},[2953],{"type":398,"value":896},{"type":393,"tag":581,"props":2955,"children":2956},{"class":583,"line":139},[2957],{"type":393,"tag":581,"props":2958,"children":2959},{"emptyLinePlaceholder":12},[2960],{"type":398,"value":614},{"type":393,"tag":581,"props":2962,"children":2963},{"class":583,"line":148},[2964,2968,2972,2977],{"type":393,"tag":581,"props":2965,"children":2966},{"style":708},[2967],{"type":398,"value":857},{"type":393,"tag":581,"props":2969,"children":2970},{"style":593},[2971],{"type":398,"value":862},{"type":393,"tag":581,"props":2973,"children":2974},{"style":647},[2975],{"type":398,"value":2976},"\"📊 Range Selection:\"",{"type":393,"tag":581,"props":2978,"children":2979},{"style":593},[2980],{"type":398,"value":872},{"type":393,"tag":581,"props":2982,"children":2983},{"class":583,"line":159},[2984,2988],{"type":393,"tag":581,"props":2985,"children":2986},{"style":708},[2987],{"type":398,"value":857},{"type":393,"tag":581,"props":2989,"children":2990},{"style":593},[2991],{"type":398,"value":896},{"type":393,"tag":581,"props":2993,"children":2994},{"class":583,"line":168},[2995],{"type":393,"tag":581,"props":2996,"children":2997},{"emptyLinePlaceholder":12},[2998],{"type":398,"value":614},{"type":393,"tag":581,"props":3000,"children":3001},{"class":583,"line":177},[3002,3006,3010,3015],{"type":393,"tag":581,"props":3003,"children":3004},{"style":708},[3005],{"type":398,"value":857},{"type":393,"tag":581,"props":3007,"children":3008},{"style":593},[3009],{"type":398,"value":862},{"type":393,"tag":581,"props":3011,"children":3012},{"style":647},[3013],{"type":398,"value":3014},"\"iloc ranges (position-based):\"",{"type":393,"tag":581,"props":3016,"children":3017},{"style":593},[3018],{"type":398,"value":872},{"type":393,"tag":581,"props":3020,"children":3021},{"class":583,"line":186},[3022,3026,3030,3035],{"type":393,"tag":581,"props":3023,"children":3024},{"style":708},[3025],{"type":398,"value":857},{"type":393,"tag":581,"props":3027,"children":3028},{"style":593},[3029],{"type":398,"value":862},{"type":393,"tag":581,"props":3031,"children":3032},{"style":647},[3033],{"type":398,"value":3034},"\"Rows 1-3, columns 1-2:\"",{"type":393,"tag":581,"props":3036,"children":3037},{"style":593},[3038],{"type":398,"value":872},{"type":393,"tag":581,"props":3040,"children":3041},{"class":583,"line":197},[3042,3046,3051,3055,3059,3064,3068,3072,3076,3080,3084],{"type":393,"tag":581,"props":3043,"children":3044},{"style":708},[3045],{"type":398,"value":857},{"type":393,"tag":581,"props":3047,"children":3048},{"style":593},[3049],{"type":398,"value":3050},"(employees.iloc[",{"type":393,"tag":581,"props":3052,"children":3053},{"style":708},[3054],{"type":398,"value":995},{"type":393,"tag":581,"props":3056,"children":3057},{"style":593},[3058],{"type":398,"value":1137},{"type":393,"tag":581,"props":3060,"children":3061},{"style":708},[3062],{"type":398,"value":3063},"4",{"type":393,"tag":581,"props":3065,"children":3066},{"style":593},[3067],{"type":398,"value":665},{"type":393,"tag":581,"props":3069,"children":3070},{"style":708},[3071],{"type":398,"value":995},{"type":393,"tag":581,"props":3073,"children":3074},{"style":593},[3075],{"type":398,"value":1137},{"type":393,"tag":581,"props":3077,"children":3078},{"style":708},[3079],{"type":398,"value":1159},{"type":393,"tag":581,"props":3081,"children":3082},{"style":593},[3083],{"type":398,"value":1000},{"type":393,"tag":581,"props":3085,"children":3086},{"style":620},[3087],{"type":398,"value":3088},"# Excludes end position\n",{"type":393,"tag":581,"props":3090,"children":3091},{"class":583,"line":206},[3092,3096],{"type":393,"tag":581,"props":3093,"children":3094},{"style":708},[3095],{"type":398,"value":857},{"type":393,"tag":581,"props":3097,"children":3098},{"style":593},[3099],{"type":398,"value":896},{"type":393,"tag":581,"props":3101,"children":3102},{"class":583,"line":215},[3103],{"type":393,"tag":581,"props":3104,"children":3105},{"emptyLinePlaceholder":12},[3106],{"type":398,"value":614},{"type":393,"tag":581,"props":3108,"children":3109},{"class":583,"line":224},[3110,3114,3118,3123],{"type":393,"tag":581,"props":3111,"children":3112},{"style":708},[3113],{"type":398,"value":857},{"type":393,"tag":581,"props":3115,"children":3116},{"style":593},[3117],{"type":398,"value":862},{"type":393,"tag":581,"props":3119,"children":3120},{"style":647},[3121],{"type":398,"value":3122},"\"loc ranges (label-based):\"",{"type":393,"tag":581,"props":3124,"children":3125},{"style":593},[3126],{"type":398,"value":872},{"type":393,"tag":581,"props":3128,"children":3129},{"class":583,"line":233},[3130,3134,3138,3143],{"type":393,"tag":581,"props":3131,"children":3132},{"style":708},[3133],{"type":398,"value":857},{"type":393,"tag":581,"props":3135,"children":3136},{"style":593},[3137],{"type":398,"value":862},{"type":393,"tag":581,"props":3139,"children":3140},{"style":647},[3141],{"type":398,"value":3142},"\"Rows 1-3, age to department:\"",{"type":393,"tag":581,"props":3144,"children":3145},{"style":593},[3146],{"type":398,"value":872},{"type":393,"tag":581,"props":3148,"children":3149},{"class":583,"line":244},[3150,3154,3159,3163,3167,3171,3175,3180,3184,3189,3193],{"type":393,"tag":581,"props":3151,"children":3152},{"style":708},[3153],{"type":398,"value":857},{"type":393,"tag":581,"props":3155,"children":3156},{"style":593},[3157],{"type":398,"value":3158},"(employees.loc[",{"type":393,"tag":581,"props":3160,"children":3161},{"style":708},[3162],{"type":398,"value":995},{"type":393,"tag":581,"props":3164,"children":3165},{"style":593},[3166],{"type":398,"value":1137},{"type":393,"tag":581,"props":3168,"children":3169},{"style":708},[3170],{"type":398,"value":1159},{"type":393,"tag":581,"props":3172,"children":3173},{"style":593},[3174],{"type":398,"value":665},{"type":393,"tag":581,"props":3176,"children":3177},{"style":647},[3178],{"type":398,"value":3179},"'age'",{"type":393,"tag":581,"props":3181,"children":3182},{"style":593},[3183],{"type":398,"value":1137},{"type":393,"tag":581,"props":3185,"children":3186},{"style":647},[3187],{"type":398,"value":3188},"'department'",{"type":393,"tag":581,"props":3190,"children":3191},{"style":593},[3192],{"type":398,"value":1000},{"type":393,"tag":581,"props":3194,"children":3195},{"style":620},[3196],{"type":398,"value":3197},"# Includes end label\n",{"type":393,"tag":581,"props":3199,"children":3200},{"class":583,"line":253},[3201,3205],{"type":393,"tag":581,"props":3202,"children":3203},{"style":708},[3204],{"type":398,"value":857},{"type":393,"tag":581,"props":3206,"children":3207},{"style":593},[3208],{"type":398,"value":896},{"type":393,"tag":581,"props":3210,"children":3211},{"class":583,"line":262},[3212],{"type":393,"tag":581,"props":3213,"children":3214},{"emptyLinePlaceholder":12},[3215],{"type":398,"value":614},{"type":393,"tag":581,"props":3217,"children":3218},{"class":583,"line":271},[3219,3223,3227,3232],{"type":393,"tag":581,"props":3220,"children":3221},{"style":708},[3222],{"type":398,"value":857},{"type":393,"tag":581,"props":3224,"children":3225},{"style":593},[3226],{"type":398,"value":862},{"type":393,"tag":581,"props":3228,"children":3229},{"style":647},[3230],{"type":398,"value":3231},"\"💡 Key Difference:\"",{"type":393,"tag":581,"props":3233,"children":3234},{"style":593},[3235],{"type":398,"value":872},{"type":393,"tag":581,"props":3237,"children":3238},{"class":583,"line":281},[3239,3243,3247,3252],{"type":393,"tag":581,"props":3240,"children":3241},{"style":708},[3242],{"type":398,"value":857},{"type":393,"tag":581,"props":3244,"children":3245},{"style":593},[3246],{"type":398,"value":862},{"type":393,"tag":581,"props":3248,"children":3249},{"style":647},[3250],{"type":398,"value":3251},"\"iloc[1:4] = positions 1, 2, 3 (excludes 4)\"",{"type":393,"tag":581,"props":3253,"children":3254},{"style":593},[3255],{"type":398,"value":872},{"type":393,"tag":581,"props":3257,"children":3258},{"class":583,"line":290},[3259,3263,3267,3272],{"type":393,"tag":581,"props":3260,"children":3261},{"style":708},[3262],{"type":398,"value":857},{"type":393,"tag":581,"props":3264,"children":3265},{"style":593},[3266],{"type":398,"value":862},{"type":393,"tag":581,"props":3268,"children":3269},{"style":647},[3270],{"type":398,"value":3271},"\"loc[1:3] = indices 1, 2, 3 (includes 3)\"",{"type":393,"tag":581,"props":3273,"children":3274},{"style":593},[3275],{"type":398,"value":872},{"type":393,"tag":550,"props":3277,"children":3279},{"id":3278},"practical-selection-examples",[3280],{"type":398,"value":3281},"🎯 Practical Selection Examples",{"type":393,"tag":401,"props":3283,"children":3284},{},[3285],{"type":398,"value":3286},"Real-world scenarios where loc and iloc shine:",{"type":393,"tag":567,"props":3288,"children":3289},{},[3290],{"type":393,"tag":571,"props":3291,"children":3293},{"className":573,"code":3292,"language":575,"meta":6,"style":6},"import pandas as pd\n\n# Survey responses\nsurvey = pd.DataFrame({\n    'respondent_id': [101, 102, 103, 104, 105],\n    'age_group': ['18-25', '26-35', '36-45', '26-35', '18-25'],\n    'satisfaction': [4, 5, 3, 4, 5],\n    'recommend': [True, True, False, True, True],\n    'comments': ['Good', 'Excellent', 'Average', 'Great', 'Perfect']\n})\n\nprint(\"Survey Data:\")\nprint(survey)\nprint()\n\nprint(\"🎯 Practical Examples:\")\nprint()\n\nprint(\"1️⃣ Get specific respondent's feedback:\")\nrespondent = survey.loc[2]  # Respondent at index 2\nprint(f\"Respondent {respondent['respondent_id']}: {respondent['comments']}\")\nprint()\n\nprint(\"2️⃣ Get satisfaction scores only:\")\nsatisfaction = survey.loc[:, 'satisfaction']\nprint(f\"Satisfaction scores: {list(satisfaction)}\")\nprint(f\"Average satisfaction: {satisfaction.mean():.1f}\")\nprint()\n\nprint(\"3️⃣ Get first and last 2 responses:\")\nfirst_last = survey.iloc[[0, 1, -2, -1]]\nprint(\"First and last 2 responses:\")\nprint(first_last[['respondent_id', 'satisfaction']])\nprint()\n\nprint(\"4️⃣ Get core metrics (columns 2-3):\")\nmetrics = survey.iloc[:, 2:4]\nprint(\"Core satisfaction metrics:\")\nprint(metrics)\n",[3294],{"type":393,"tag":405,"props":3295,"children":3296},{"__ignoreMap":6},[3297,3316,3323,3331,3347,3404,3459,3512,3566,3623,3630,3637,3657,3669,3680,3687,3707,3718,3725,3745,3776,3857,3868,3875,3895,3921,3963,4009,4020,4027,4047,4105,4125,4153,4164,4171,4191,4224,4244],{"type":393,"tag":581,"props":3298,"children":3299},{"class":583,"line":11},[3300,3304,3308,3312],{"type":393,"tag":581,"props":3301,"children":3302},{"style":587},[3303],{"type":398,"value":590},{"type":393,"tag":581,"props":3305,"children":3306},{"style":593},[3307],{"type":398,"value":596},{"type":393,"tag":581,"props":3309,"children":3310},{"style":587},[3311],{"type":398,"value":601},{"type":393,"tag":581,"props":3313,"children":3314},{"style":593},[3315],{"type":398,"value":606},{"type":393,"tag":581,"props":3317,"children":3318},{"class":583,"line":27},[3319],{"type":393,"tag":581,"props":3320,"children":3321},{"emptyLinePlaceholder":12},[3322],{"type":398,"value":614},{"type":393,"tag":581,"props":3324,"children":3325},{"class":583,"line":36},[3326],{"type":393,"tag":581,"props":3327,"children":3328},{"style":620},[3329],{"type":398,"value":3330},"# Survey responses\n",{"type":393,"tag":581,"props":3332,"children":3333},{"class":583,"line":45},[3334,3339,3343],{"type":393,"tag":581,"props":3335,"children":3336},{"style":593},[3337],{"type":398,"value":3338},"survey ",{"type":393,"tag":581,"props":3340,"children":3341},{"style":587},[3342],{"type":398,"value":636},{"type":393,"tag":581,"props":3344,"children":3345},{"style":593},[3346],{"type":398,"value":641},{"type":393,"tag":581,"props":3348,"children":3349},{"class":583,"line":54},[3350,3355,3359,3364,3368,3373,3377,3382,3386,3391,3395,3400],{"type":393,"tag":581,"props":3351,"children":3352},{"style":647},[3353],{"type":398,"value":3354},"    'respondent_id'",{"type":393,"tag":581,"props":3356,"children":3357},{"style":593},[3358],{"type":398,"value":655},{"type":393,"tag":581,"props":3360,"children":3361},{"style":708},[3362],{"type":398,"value":3363},"101",{"type":393,"tag":581,"props":3365,"children":3366},{"style":593},[3367],{"type":398,"value":665},{"type":393,"tag":581,"props":3369,"children":3370},{"style":708},[3371],{"type":398,"value":3372},"102",{"type":393,"tag":581,"props":3374,"children":3375},{"style":593},[3376],{"type":398,"value":665},{"type":393,"tag":581,"props":3378,"children":3379},{"style":708},[3380],{"type":398,"value":3381},"103",{"type":393,"tag":581,"props":3383,"children":3384},{"style":593},[3385],{"type":398,"value":665},{"type":393,"tag":581,"props":3387,"children":3388},{"style":708},[3389],{"type":398,"value":3390},"104",{"type":393,"tag":581,"props":3392,"children":3393},{"style":593},[3394],{"type":398,"value":665},{"type":393,"tag":581,"props":3396,"children":3397},{"style":708},[3398],{"type":398,"value":3399},"105",{"type":393,"tag":581,"props":3401,"children":3402},{"style":593},[3403],{"type":398,"value":693},{"type":393,"tag":581,"props":3405,"children":3406},{"class":583,"line":63},[3407,3412,3416,3421,3425,3430,3434,3439,3443,3447,3451,3455],{"type":393,"tag":581,"props":3408,"children":3409},{"style":647},[3410],{"type":398,"value":3411},"    'age_group'",{"type":393,"tag":581,"props":3413,"children":3414},{"style":593},[3415],{"type":398,"value":655},{"type":393,"tag":581,"props":3417,"children":3418},{"style":647},[3419],{"type":398,"value":3420},"'18-25'",{"type":393,"tag":581,"props":3422,"children":3423},{"style":593},[3424],{"type":398,"value":665},{"type":393,"tag":581,"props":3426,"children":3427},{"style":647},[3428],{"type":398,"value":3429},"'26-35'",{"type":393,"tag":581,"props":3431,"children":3432},{"style":593},[3433],{"type":398,"value":665},{"type":393,"tag":581,"props":3435,"children":3436},{"style":647},[3437],{"type":398,"value":3438},"'36-45'",{"type":393,"tag":581,"props":3440,"children":3441},{"style":593},[3442],{"type":398,"value":665},{"type":393,"tag":581,"props":3444,"children":3445},{"style":647},[3446],{"type":398,"value":3429},{"type":393,"tag":581,"props":3448,"children":3449},{"style":593},[3450],{"type":398,"value":665},{"type":393,"tag":581,"props":3452,"children":3453},{"style":647},[3454],{"type":398,"value":3420},{"type":393,"tag":581,"props":3456,"children":3457},{"style":593},[3458],{"type":398,"value":693},{"type":393,"tag":581,"props":3460,"children":3461},{"class":583,"line":72},[3462,3467,3471,3475,3479,3484,3488,3492,3496,3500,3504,3508],{"type":393,"tag":581,"props":3463,"children":3464},{"style":647},[3465],{"type":398,"value":3466},"    'satisfaction'",{"type":393,"tag":581,"props":3468,"children":3469},{"style":593},[3470],{"type":398,"value":655},{"type":393,"tag":581,"props":3472,"children":3473},{"style":708},[3474],{"type":398,"value":3063},{"type":393,"tag":581,"props":3476,"children":3477},{"style":593},[3478],{"type":398,"value":665},{"type":393,"tag":581,"props":3480,"children":3481},{"style":708},[3482],{"type":398,"value":3483},"5",{"type":393,"tag":581,"props":3485,"children":3486},{"style":593},[3487],{"type":398,"value":665},{"type":393,"tag":581,"props":3489,"children":3490},{"style":708},[3491],{"type":398,"value":1159},{"type":393,"tag":581,"props":3493,"children":3494},{"style":593},[3495],{"type":398,"value":665},{"type":393,"tag":581,"props":3497,"children":3498},{"style":708},[3499],{"type":398,"value":3063},{"type":393,"tag":581,"props":3501,"children":3502},{"style":593},[3503],{"type":398,"value":665},{"type":393,"tag":581,"props":3505,"children":3506},{"style":708},[3507],{"type":398,"value":3483},{"type":393,"tag":581,"props":3509,"children":3510},{"style":593},[3511],{"type":398,"value":693},{"type":393,"tag":581,"props":3513,"children":3514},{"class":583,"line":83},[3515,3520,3524,3529,3533,3537,3541,3546,3550,3554,3558,3562],{"type":393,"tag":581,"props":3516,"children":3517},{"style":647},[3518],{"type":398,"value":3519},"    'recommend'",{"type":393,"tag":581,"props":3521,"children":3522},{"style":593},[3523],{"type":398,"value":655},{"type":393,"tag":581,"props":3525,"children":3526},{"style":708},[3527],{"type":398,"value":3528},"True",{"type":393,"tag":581,"props":3530,"children":3531},{"style":593},[3532],{"type":398,"value":665},{"type":393,"tag":581,"props":3534,"children":3535},{"style":708},[3536],{"type":398,"value":3528},{"type":393,"tag":581,"props":3538,"children":3539},{"style":593},[3540],{"type":398,"value":665},{"type":393,"tag":581,"props":3542,"children":3543},{"style":708},[3544],{"type":398,"value":3545},"False",{"type":393,"tag":581,"props":3547,"children":3548},{"style":593},[3549],{"type":398,"value":665},{"type":393,"tag":581,"props":3551,"children":3552},{"style":708},[3553],{"type":398,"value":3528},{"type":393,"tag":581,"props":3555,"children":3556},{"style":593},[3557],{"type":398,"value":665},{"type":393,"tag":581,"props":3559,"children":3560},{"style":708},[3561],{"type":398,"value":3528},{"type":393,"tag":581,"props":3563,"children":3564},{"style":593},[3565],{"type":398,"value":693},{"type":393,"tag":581,"props":3567,"children":3568},{"class":583,"line":92},[3569,3574,3578,3583,3587,3592,3596,3601,3605,3610,3614,3619],{"type":393,"tag":581,"props":3570,"children":3571},{"style":647},[3572],{"type":398,"value":3573},"    'comments'",{"type":393,"tag":581,"props":3575,"children":3576},{"style":593},[3577],{"type":398,"value":655},{"type":393,"tag":581,"props":3579,"children":3580},{"style":647},[3581],{"type":398,"value":3582},"'Good'",{"type":393,"tag":581,"props":3584,"children":3585},{"style":593},[3586],{"type":398,"value":665},{"type":393,"tag":581,"props":3588,"children":3589},{"style":647},[3590],{"type":398,"value":3591},"'Excellent'",{"type":393,"tag":581,"props":3593,"children":3594},{"style":593},[3595],{"type":398,"value":665},{"type":393,"tag":581,"props":3597,"children":3598},{"style":647},[3599],{"type":398,"value":3600},"'Average'",{"type":393,"tag":581,"props":3602,"children":3603},{"style":593},[3604],{"type":398,"value":665},{"type":393,"tag":581,"props":3606,"children":3607},{"style":647},[3608],{"type":398,"value":3609},"'Great'",{"type":393,"tag":581,"props":3611,"children":3612},{"style":593},[3613],{"type":398,"value":665},{"type":393,"tag":581,"props":3615,"children":3616},{"style":647},[3617],{"type":398,"value":3618},"'Perfect'",{"type":393,"tag":581,"props":3620,"children":3621},{"style":593},[3622],{"type":398,"value":834},{"type":393,"tag":581,"props":3624,"children":3625},{"class":583,"line":101},[3626],{"type":393,"tag":581,"props":3627,"children":3628},{"style":593},[3629],{"type":398,"value":842},{"type":393,"tag":581,"props":3631,"children":3632},{"class":583,"line":110},[3633],{"type":393,"tag":581,"props":3634,"children":3635},{"emptyLinePlaceholder":12},[3636],{"type":398,"value":614},{"type":393,"tag":581,"props":3638,"children":3639},{"class":583,"line":121},[3640,3644,3648,3653],{"type":393,"tag":581,"props":3641,"children":3642},{"style":708},[3643],{"type":398,"value":857},{"type":393,"tag":581,"props":3645,"children":3646},{"style":593},[3647],{"type":398,"value":862},{"type":393,"tag":581,"props":3649,"children":3650},{"style":647},[3651],{"type":398,"value":3652},"\"Survey Data:\"",{"type":393,"tag":581,"props":3654,"children":3655},{"style":593},[3656],{"type":398,"value":872},{"type":393,"tag":581,"props":3658,"children":3659},{"class":583,"line":130},[3660,3664],{"type":393,"tag":581,"props":3661,"children":3662},{"style":708},[3663],{"type":398,"value":857},{"type":393,"tag":581,"props":3665,"children":3666},{"style":593},[3667],{"type":398,"value":3668},"(survey)\n",{"type":393,"tag":581,"props":3670,"children":3671},{"class":583,"line":139},[3672,3676],{"type":393,"tag":581,"props":3673,"children":3674},{"style":708},[3675],{"type":398,"value":857},{"type":393,"tag":581,"props":3677,"children":3678},{"style":593},[3679],{"type":398,"value":896},{"type":393,"tag":581,"props":3681,"children":3682},{"class":583,"line":148},[3683],{"type":393,"tag":581,"props":3684,"children":3685},{"emptyLinePlaceholder":12},[3686],{"type":398,"value":614},{"type":393,"tag":581,"props":3688,"children":3689},{"class":583,"line":159},[3690,3694,3698,3703],{"type":393,"tag":581,"props":3691,"children":3692},{"style":708},[3693],{"type":398,"value":857},{"type":393,"tag":581,"props":3695,"children":3696},{"style":593},[3697],{"type":398,"value":862},{"type":393,"tag":581,"props":3699,"children":3700},{"style":647},[3701],{"type":398,"value":3702},"\"🎯 Practical Examples:\"",{"type":393,"tag":581,"props":3704,"children":3705},{"style":593},[3706],{"type":398,"value":872},{"type":393,"tag":581,"props":3708,"children":3709},{"class":583,"line":168},[3710,3714],{"type":393,"tag":581,"props":3711,"children":3712},{"style":708},[3713],{"type":398,"value":857},{"type":393,"tag":581,"props":3715,"children":3716},{"style":593},[3717],{"type":398,"value":896},{"type":393,"tag":581,"props":3719,"children":3720},{"class":583,"line":177},[3721],{"type":393,"tag":581,"props":3722,"children":3723},{"emptyLinePlaceholder":12},[3724],{"type":398,"value":614},{"type":393,"tag":581,"props":3726,"children":3727},{"class":583,"line":186},[3728,3732,3736,3741],{"type":393,"tag":581,"props":3729,"children":3730},{"style":708},[3731],{"type":398,"value":857},{"type":393,"tag":581,"props":3733,"children":3734},{"style":593},[3735],{"type":398,"value":862},{"type":393,"tag":581,"props":3737,"children":3738},{"style":647},[3739],{"type":398,"value":3740},"\"1️⃣ Get specific respondent's feedback:\"",{"type":393,"tag":581,"props":3742,"children":3743},{"style":593},[3744],{"type":398,"value":872},{"type":393,"tag":581,"props":3746,"children":3747},{"class":583,"line":197},[3748,3753,3757,3762,3766,3771],{"type":393,"tag":581,"props":3749,"children":3750},{"style":593},[3751],{"type":398,"value":3752},"respondent ",{"type":393,"tag":581,"props":3754,"children":3755},{"style":587},[3756],{"type":398,"value":636},{"type":393,"tag":581,"props":3758,"children":3759},{"style":593},[3760],{"type":398,"value":3761}," survey.loc[",{"type":393,"tag":581,"props":3763,"children":3764},{"style":708},[3765],{"type":398,"value":1142},{"type":393,"tag":581,"props":3767,"children":3768},{"style":593},[3769],{"type":398,"value":3770},"]  ",{"type":393,"tag":581,"props":3772,"children":3773},{"style":620},[3774],{"type":398,"value":3775},"# Respondent at index 2\n",{"type":393,"tag":581,"props":3777,"children":3778},{"class":583,"line":206},[3779,3783,3787,3792,3797,3802,3807,3812,3817,3822,3827,3831,3835,3840,3844,3848,3853],{"type":393,"tag":581,"props":3780,"children":3781},{"style":708},[3782],{"type":398,"value":857},{"type":393,"tag":581,"props":3784,"children":3785},{"style":593},[3786],{"type":398,"value":862},{"type":393,"tag":581,"props":3788,"children":3789},{"style":587},[3790],{"type":398,"value":3791},"f",{"type":393,"tag":581,"props":3793,"children":3794},{"style":647},[3795],{"type":398,"value":3796},"\"Respondent ",{"type":393,"tag":581,"props":3798,"children":3799},{"style":708},[3800],{"type":398,"value":3801},"{",{"type":393,"tag":581,"props":3803,"children":3804},{"style":593},[3805],{"type":398,"value":3806},"respondent[",{"type":393,"tag":581,"props":3808,"children":3809},{"style":647},[3810],{"type":398,"value":3811},"'respondent_id'",{"type":393,"tag":581,"props":3813,"children":3814},{"style":593},[3815],{"type":398,"value":3816},"]",{"type":393,"tag":581,"props":3818,"children":3819},{"style":708},[3820],{"type":398,"value":3821},"}",{"type":393,"tag":581,"props":3823,"children":3824},{"style":647},[3825],{"type":398,"value":3826},": ",{"type":393,"tag":581,"props":3828,"children":3829},{"style":708},[3830],{"type":398,"value":3801},{"type":393,"tag":581,"props":3832,"children":3833},{"style":593},[3834],{"type":398,"value":3806},{"type":393,"tag":581,"props":3836,"children":3837},{"style":647},[3838],{"type":398,"value":3839},"'comments'",{"type":393,"tag":581,"props":3841,"children":3842},{"style":593},[3843],{"type":398,"value":3816},{"type":393,"tag":581,"props":3845,"children":3846},{"style":708},[3847],{"type":398,"value":3821},{"type":393,"tag":581,"props":3849,"children":3850},{"style":647},[3851],{"type":398,"value":3852},"\"",{"type":393,"tag":581,"props":3854,"children":3855},{"style":593},[3856],{"type":398,"value":872},{"type":393,"tag":581,"props":3858,"children":3859},{"class":583,"line":215},[3860,3864],{"type":393,"tag":581,"props":3861,"children":3862},{"style":708},[3863],{"type":398,"value":857},{"type":393,"tag":581,"props":3865,"children":3866},{"style":593},[3867],{"type":398,"value":896},{"type":393,"tag":581,"props":3869,"children":3870},{"class":583,"line":224},[3871],{"type":393,"tag":581,"props":3872,"children":3873},{"emptyLinePlaceholder":12},[3874],{"type":398,"value":614},{"type":393,"tag":581,"props":3876,"children":3877},{"class":583,"line":233},[3878,3882,3886,3891],{"type":393,"tag":581,"props":3879,"children":3880},{"style":708},[3881],{"type":398,"value":857},{"type":393,"tag":581,"props":3883,"children":3884},{"style":593},[3885],{"type":398,"value":862},{"type":393,"tag":581,"props":3887,"children":3888},{"style":647},[3889],{"type":398,"value":3890},"\"2️⃣ Get satisfaction scores only:\"",{"type":393,"tag":581,"props":3892,"children":3893},{"style":593},[3894],{"type":398,"value":872},{"type":393,"tag":581,"props":3896,"children":3897},{"class":583,"line":244},[3898,3903,3907,3912,3917],{"type":393,"tag":581,"props":3899,"children":3900},{"style":593},[3901],{"type":398,"value":3902},"satisfaction ",{"type":393,"tag":581,"props":3904,"children":3905},{"style":587},[3906],{"type":398,"value":636},{"type":393,"tag":581,"props":3908,"children":3909},{"style":593},[3910],{"type":398,"value":3911}," survey.loc[:, ",{"type":393,"tag":581,"props":3913,"children":3914},{"style":647},[3915],{"type":398,"value":3916},"'satisfaction'",{"type":393,"tag":581,"props":3918,"children":3919},{"style":593},[3920],{"type":398,"value":834},{"type":393,"tag":581,"props":3922,"children":3923},{"class":583,"line":253},[3924,3928,3932,3936,3941,3946,3951,3955,3959],{"type":393,"tag":581,"props":3925,"children":3926},{"style":708},[3927],{"type":398,"value":857},{"type":393,"tag":581,"props":3929,"children":3930},{"style":593},[3931],{"type":398,"value":862},{"type":393,"tag":581,"props":3933,"children":3934},{"style":587},[3935],{"type":398,"value":3791},{"type":393,"tag":581,"props":3937,"children":3938},{"style":647},[3939],{"type":398,"value":3940},"\"Satisfaction scores: ",{"type":393,"tag":581,"props":3942,"children":3943},{"style":708},[3944],{"type":398,"value":3945},"{list",{"type":393,"tag":581,"props":3947,"children":3948},{"style":593},[3949],{"type":398,"value":3950},"(satisfaction)",{"type":393,"tag":581,"props":3952,"children":3953},{"style":708},[3954],{"type":398,"value":3821},{"type":393,"tag":581,"props":3956,"children":3957},{"style":647},[3958],{"type":398,"value":3852},{"type":393,"tag":581,"props":3960,"children":3961},{"style":593},[3962],{"type":398,"value":872},{"type":393,"tag":581,"props":3964,"children":3965},{"class":583,"line":262},[3966,3970,3974,3978,3983,3987,3992,3997,4001,4005],{"type":393,"tag":581,"props":3967,"children":3968},{"style":708},[3969],{"type":398,"value":857},{"type":393,"tag":581,"props":3971,"children":3972},{"style":593},[3973],{"type":398,"value":862},{"type":393,"tag":581,"props":3975,"children":3976},{"style":587},[3977],{"type":398,"value":3791},{"type":393,"tag":581,"props":3979,"children":3980},{"style":647},[3981],{"type":398,"value":3982},"\"Average satisfaction: ",{"type":393,"tag":581,"props":3984,"children":3985},{"style":708},[3986],{"type":398,"value":3801},{"type":393,"tag":581,"props":3988,"children":3989},{"style":593},[3990],{"type":398,"value":3991},"satisfaction.mean()",{"type":393,"tag":581,"props":3993,"children":3994},{"style":587},[3995],{"type":398,"value":3996},":.1f",{"type":393,"tag":581,"props":3998,"children":3999},{"style":708},[4000],{"type":398,"value":3821},{"type":393,"tag":581,"props":4002,"children":4003},{"style":647},[4004],{"type":398,"value":3852},{"type":393,"tag":581,"props":4006,"children":4007},{"style":593},[4008],{"type":398,"value":872},{"type":393,"tag":581,"props":4010,"children":4011},{"class":583,"line":271},[4012,4016],{"type":393,"tag":581,"props":4013,"children":4014},{"style":708},[4015],{"type":398,"value":857},{"type":393,"tag":581,"props":4017,"children":4018},{"style":593},[4019],{"type":398,"value":896},{"type":393,"tag":581,"props":4021,"children":4022},{"class":583,"line":281},[4023],{"type":393,"tag":581,"props":4024,"children":4025},{"emptyLinePlaceholder":12},[4026],{"type":398,"value":614},{"type":393,"tag":581,"props":4028,"children":4029},{"class":583,"line":290},[4030,4034,4038,4043],{"type":393,"tag":581,"props":4031,"children":4032},{"style":708},[4033],{"type":398,"value":857},{"type":393,"tag":581,"props":4035,"children":4036},{"style":593},[4037],{"type":398,"value":862},{"type":393,"tag":581,"props":4039,"children":4040},{"style":647},[4041],{"type":398,"value":4042},"\"3️⃣ Get first and last 2 responses:\"",{"type":393,"tag":581,"props":4044,"children":4045},{"style":593},[4046],{"type":398,"value":872},{"type":393,"tag":581,"props":4048,"children":4049},{"class":583,"line":299},[4050,4055,4059,4064,4068,4072,4076,4080,4084,4088,4092,4096,4100],{"type":393,"tag":581,"props":4051,"children":4052},{"style":593},[4053],{"type":398,"value":4054},"first_last ",{"type":393,"tag":581,"props":4056,"children":4057},{"style":587},[4058],{"type":398,"value":636},{"type":393,"tag":581,"props":4060,"children":4061},{"style":593},[4062],{"type":398,"value":4063}," survey.iloc[[",{"type":393,"tag":581,"props":4065,"children":4066},{"style":708},[4067],{"type":398,"value":986},{"type":393,"tag":581,"props":4069,"children":4070},{"style":593},[4071],{"type":398,"value":665},{"type":393,"tag":581,"props":4073,"children":4074},{"style":708},[4075],{"type":398,"value":995},{"type":393,"tag":581,"props":4077,"children":4078},{"style":593},[4079],{"type":398,"value":665},{"type":393,"tag":581,"props":4081,"children":4082},{"style":587},[4083],{"type":398,"value":2328},{"type":393,"tag":581,"props":4085,"children":4086},{"style":708},[4087],{"type":398,"value":1142},{"type":393,"tag":581,"props":4089,"children":4090},{"style":593},[4091],{"type":398,"value":665},{"type":393,"tag":581,"props":4093,"children":4094},{"style":587},[4095],{"type":398,"value":2328},{"type":393,"tag":581,"props":4097,"children":4098},{"style":708},[4099],{"type":398,"value":995},{"type":393,"tag":581,"props":4101,"children":4102},{"style":593},[4103],{"type":398,"value":4104},"]]\n",{"type":393,"tag":581,"props":4106,"children":4107},{"class":583,"line":308},[4108,4112,4116,4121],{"type":393,"tag":581,"props":4109,"children":4110},{"style":708},[4111],{"type":398,"value":857},{"type":393,"tag":581,"props":4113,"children":4114},{"style":593},[4115],{"type":398,"value":862},{"type":393,"tag":581,"props":4117,"children":4118},{"style":647},[4119],{"type":398,"value":4120},"\"First and last 2 responses:\"",{"type":393,"tag":581,"props":4122,"children":4123},{"style":593},[4124],{"type":398,"value":872},{"type":393,"tag":581,"props":4126,"children":4127},{"class":583,"line":318},[4128,4132,4137,4141,4145,4149],{"type":393,"tag":581,"props":4129,"children":4130},{"style":708},[4131],{"type":398,"value":857},{"type":393,"tag":581,"props":4133,"children":4134},{"style":593},[4135],{"type":398,"value":4136},"(first_last[[",{"type":393,"tag":581,"props":4138,"children":4139},{"style":647},[4140],{"type":398,"value":3811},{"type":393,"tag":581,"props":4142,"children":4143},{"style":593},[4144],{"type":398,"value":665},{"type":393,"tag":581,"props":4146,"children":4147},{"style":647},[4148],{"type":398,"value":3916},{"type":393,"tag":581,"props":4150,"children":4151},{"style":593},[4152],{"type":398,"value":1831},{"type":393,"tag":581,"props":4154,"children":4155},{"class":583,"line":327},[4156,4160],{"type":393,"tag":581,"props":4157,"children":4158},{"style":708},[4159],{"type":398,"value":857},{"type":393,"tag":581,"props":4161,"children":4162},{"style":593},[4163],{"type":398,"value":896},{"type":393,"tag":581,"props":4165,"children":4166},{"class":583,"line":336},[4167],{"type":393,"tag":581,"props":4168,"children":4169},{"emptyLinePlaceholder":12},[4170],{"type":398,"value":614},{"type":393,"tag":581,"props":4172,"children":4173},{"class":583,"line":346},[4174,4178,4182,4187],{"type":393,"tag":581,"props":4175,"children":4176},{"style":708},[4177],{"type":398,"value":857},{"type":393,"tag":581,"props":4179,"children":4180},{"style":593},[4181],{"type":398,"value":862},{"type":393,"tag":581,"props":4183,"children":4184},{"style":647},[4185],{"type":398,"value":4186},"\"4️⃣ Get core metrics (columns 2-3):\"",{"type":393,"tag":581,"props":4188,"children":4189},{"style":593},[4190],{"type":398,"value":872},{"type":393,"tag":581,"props":4192,"children":4193},{"class":583,"line":355},[4194,4199,4203,4208,4212,4216,4220],{"type":393,"tag":581,"props":4195,"children":4196},{"style":593},[4197],{"type":398,"value":4198},"metrics ",{"type":393,"tag":581,"props":4200,"children":4201},{"style":587},[4202],{"type":398,"value":636},{"type":393,"tag":581,"props":4204,"children":4205},{"style":593},[4206],{"type":398,"value":4207}," survey.iloc[:, ",{"type":393,"tag":581,"props":4209,"children":4210},{"style":708},[4211],{"type":398,"value":1142},{"type":393,"tag":581,"props":4213,"children":4214},{"style":593},[4215],{"type":398,"value":1137},{"type":393,"tag":581,"props":4217,"children":4218},{"style":708},[4219],{"type":398,"value":3063},{"type":393,"tag":581,"props":4221,"children":4222},{"style":593},[4223],{"type":398,"value":834},{"type":393,"tag":581,"props":4225,"children":4226},{"class":583,"line":364},[4227,4231,4235,4240],{"type":393,"tag":581,"props":4228,"children":4229},{"style":708},[4230],{"type":398,"value":857},{"type":393,"tag":581,"props":4232,"children":4233},{"style":593},[4234],{"type":398,"value":862},{"type":393,"tag":581,"props":4236,"children":4237},{"style":647},[4238],{"type":398,"value":4239},"\"Core satisfaction metrics:\"",{"type":393,"tag":581,"props":4241,"children":4242},{"style":593},[4243],{"type":398,"value":872},{"type":393,"tag":581,"props":4245,"children":4246},{"class":583,"line":374},[4247,4251],{"type":393,"tag":581,"props":4248,"children":4249},{"style":708},[4250],{"type":398,"value":857},{"type":393,"tag":581,"props":4252,"children":4253},{"style":593},[4254],{"type":398,"value":4255},"(metrics)\n",{"type":393,"tag":550,"props":4257,"children":4259},{"id":4258},"advanced-selection-techniques",[4260],{"type":398,"value":4261},"🔧 Advanced Selection Techniques",{"type":393,"tag":401,"props":4263,"children":4264},{},[4265],{"type":398,"value":4266},"Combine conditions and selections for powerful data access:",{"type":393,"tag":567,"props":4268,"children":4269},{},[4270],{"type":393,"tag":571,"props":4271,"children":4273},{"className":573,"code":4272,"language":575,"meta":6,"style":6},"import pandas as pd\n\n# Student performance\nstudents = pd.DataFrame({\n    'name': ['Alice', 'Bob', 'Charlie', 'Diana', 'Eve'],\n    'grade': ['A', 'B', 'A', 'C', 'B'],\n    'score': [95, 82, 88, 76, 85],\n    'attendance': [98, 92, 95, 85, 90]\n})\n\nprint(\"Student Performance:\")\nprint(students)\nprint()\n\nprint(\"🔧 Advanced Techniques:\")\nprint()\n\nprint(\"1️⃣ High performers (score > 85) - names only:\")\nhigh_performers = students.loc[students['score'] > 85, 'name']\nprint(list(high_performers))\nprint()\n\nprint(\"2️⃣ Grade A students - all info:\")\ngrade_a = students.loc[students['grade'] == 'A']\nprint(grade_a)\nprint()\n\nprint(\"3️⃣ Good attendance (>90) - names and scores:\")\ngood_attendance = students.loc[\n    students['attendance'] > 90, \n    ['name', 'score']\n]\nprint(good_attendance)\nprint()\n\nprint(\"4️⃣ Multiple conditions - A grade OR score > 85:\")\ntop_students = students.loc[\n    (students['grade'] == 'A') | (students['score'] > 85)\n]\nprint(top_students[['name', 'grade', 'score']])\n",[4274],{"type":393,"tag":405,"props":4275,"children":4276},{"__ignoreMap":6},[4277,4296,4303,4311,4327,4378,4433,4487,4540,4547,4554,4574,4586,4597,4604,4624,4635,4642,4662,4712,4733,4744,4751,4771,4810,4822,4833,4840,4860,4877,4908,4932,4939,4951,4962,4969,4989,5005,5064,5071],{"type":393,"tag":581,"props":4278,"children":4279},{"class":583,"line":11},[4280,4284,4288,4292],{"type":393,"tag":581,"props":4281,"children":4282},{"style":587},[4283],{"type":398,"value":590},{"type":393,"tag":581,"props":4285,"children":4286},{"style":593},[4287],{"type":398,"value":596},{"type":393,"tag":581,"props":4289,"children":4290},{"style":587},[4291],{"type":398,"value":601},{"type":393,"tag":581,"props":4293,"children":4294},{"style":593},[4295],{"type":398,"value":606},{"type":393,"tag":581,"props":4297,"children":4298},{"class":583,"line":27},[4299],{"type":393,"tag":581,"props":4300,"children":4301},{"emptyLinePlaceholder":12},[4302],{"type":398,"value":614},{"type":393,"tag":581,"props":4304,"children":4305},{"class":583,"line":36},[4306],{"type":393,"tag":581,"props":4307,"children":4308},{"style":620},[4309],{"type":398,"value":4310},"# Student performance\n",{"type":393,"tag":581,"props":4312,"children":4313},{"class":583,"line":45},[4314,4319,4323],{"type":393,"tag":581,"props":4315,"children":4316},{"style":593},[4317],{"type":398,"value":4318},"students ",{"type":393,"tag":581,"props":4320,"children":4321},{"style":587},[4322],{"type":398,"value":636},{"type":393,"tag":581,"props":4324,"children":4325},{"style":593},[4326],{"type":398,"value":641},{"type":393,"tag":581,"props":4328,"children":4329},{"class":583,"line":54},[4330,4334,4338,4342,4346,4350,4354,4358,4362,4366,4370,4374],{"type":393,"tag":581,"props":4331,"children":4332},{"style":647},[4333],{"type":398,"value":650},{"type":393,"tag":581,"props":4335,"children":4336},{"style":593},[4337],{"type":398,"value":655},{"type":393,"tag":581,"props":4339,"children":4340},{"style":647},[4341],{"type":398,"value":660},{"type":393,"tag":581,"props":4343,"children":4344},{"style":593},[4345],{"type":398,"value":665},{"type":393,"tag":581,"props":4347,"children":4348},{"style":647},[4349],{"type":398,"value":670},{"type":393,"tag":581,"props":4351,"children":4352},{"style":593},[4353],{"type":398,"value":665},{"type":393,"tag":581,"props":4355,"children":4356},{"style":647},[4357],{"type":398,"value":679},{"type":393,"tag":581,"props":4359,"children":4360},{"style":593},[4361],{"type":398,"value":665},{"type":393,"tag":581,"props":4363,"children":4364},{"style":647},[4365],{"type":398,"value":688},{"type":393,"tag":581,"props":4367,"children":4368},{"style":593},[4369],{"type":398,"value":665},{"type":393,"tag":581,"props":4371,"children":4372},{"style":647},[4373],{"type":398,"value":2724},{"type":393,"tag":581,"props":4375,"children":4376},{"style":593},[4377],{"type":398,"value":693},{"type":393,"tag":581,"props":4379,"children":4380},{"class":583,"line":63},[4381,4386,4390,4395,4399,4404,4408,4412,4416,4421,4425,4429],{"type":393,"tag":581,"props":4382,"children":4383},{"style":647},[4384],{"type":398,"value":4385},"    'grade'",{"type":393,"tag":581,"props":4387,"children":4388},{"style":593},[4389],{"type":398,"value":655},{"type":393,"tag":581,"props":4391,"children":4392},{"style":647},[4393],{"type":398,"value":4394},"'A'",{"type":393,"tag":581,"props":4396,"children":4397},{"style":593},[4398],{"type":398,"value":665},{"type":393,"tag":581,"props":4400,"children":4401},{"style":647},[4402],{"type":398,"value":4403},"'B'",{"type":393,"tag":581,"props":4405,"children":4406},{"style":593},[4407],{"type":398,"value":665},{"type":393,"tag":581,"props":4409,"children":4410},{"style":647},[4411],{"type":398,"value":4394},{"type":393,"tag":581,"props":4413,"children":4414},{"style":593},[4415],{"type":398,"value":665},{"type":393,"tag":581,"props":4417,"children":4418},{"style":647},[4419],{"type":398,"value":4420},"'C'",{"type":393,"tag":581,"props":4422,"children":4423},{"style":593},[4424],{"type":398,"value":665},{"type":393,"tag":581,"props":4426,"children":4427},{"style":647},[4428],{"type":398,"value":4403},{"type":393,"tag":581,"props":4430,"children":4431},{"style":593},[4432],{"type":398,"value":693},{"type":393,"tag":581,"props":4434,"children":4435},{"class":583,"line":72},[4436,4441,4445,4449,4453,4458,4462,4466,4470,4475,4479,4483],{"type":393,"tag":581,"props":4437,"children":4438},{"style":647},[4439],{"type":398,"value":4440},"    'score'",{"type":393,"tag":581,"props":4442,"children":4443},{"style":593},[4444],{"type":398,"value":655},{"type":393,"tag":581,"props":4446,"children":4447},{"style":708},[4448],{"type":398,"value":738},{"type":393,"tag":581,"props":4450,"children":4451},{"style":593},[4452],{"type":398,"value":665},{"type":393,"tag":581,"props":4454,"children":4455},{"style":708},[4456],{"type":398,"value":4457},"82",{"type":393,"tag":581,"props":4459,"children":4460},{"style":593},[4461],{"type":398,"value":665},{"type":393,"tag":581,"props":4463,"children":4464},{"style":708},[4465],{"type":398,"value":768},{"type":393,"tag":581,"props":4467,"children":4468},{"style":593},[4469],{"type":398,"value":665},{"type":393,"tag":581,"props":4471,"children":4472},{"style":708},[4473],{"type":398,"value":4474},"76",{"type":393,"tag":581,"props":4476,"children":4477},{"style":593},[4478],{"type":398,"value":665},{"type":393,"tag":581,"props":4480,"children":4481},{"style":708},[4482],{"type":398,"value":711},{"type":393,"tag":581,"props":4484,"children":4485},{"style":593},[4486],{"type":398,"value":693},{"type":393,"tag":581,"props":4488,"children":4489},{"class":583,"line":83},[4490,4495,4499,4504,4508,4512,4516,4520,4524,4528,4532,4536],{"type":393,"tag":581,"props":4491,"children":4492},{"style":647},[4493],{"type":398,"value":4494},"    'attendance'",{"type":393,"tag":581,"props":4496,"children":4497},{"style":593},[4498],{"type":398,"value":655},{"type":393,"tag":581,"props":4500,"children":4501},{"style":708},[4502],{"type":398,"value":4503},"98",{"type":393,"tag":581,"props":4505,"children":4506},{"style":593},[4507],{"type":398,"value":665},{"type":393,"tag":581,"props":4509,"children":4510},{"style":708},[4511],{"type":398,"value":720},{"type":393,"tag":581,"props":4513,"children":4514},{"style":593},[4515],{"type":398,"value":665},{"type":393,"tag":581,"props":4517,"children":4518},{"style":708},[4519],{"type":398,"value":738},{"type":393,"tag":581,"props":4521,"children":4522},{"style":593},[4523],{"type":398,"value":665},{"type":393,"tag":581,"props":4525,"children":4526},{"style":708},[4527],{"type":398,"value":711},{"type":393,"tag":581,"props":4529,"children":4530},{"style":593},[4531],{"type":398,"value":665},{"type":393,"tag":581,"props":4533,"children":4534},{"style":708},[4535],{"type":398,"value":759},{"type":393,"tag":581,"props":4537,"children":4538},{"style":593},[4539],{"type":398,"value":834},{"type":393,"tag":581,"props":4541,"children":4542},{"class":583,"line":92},[4543],{"type":393,"tag":581,"props":4544,"children":4545},{"style":593},[4546],{"type":398,"value":842},{"type":393,"tag":581,"props":4548,"children":4549},{"class":583,"line":101},[4550],{"type":393,"tag":581,"props":4551,"children":4552},{"emptyLinePlaceholder":12},[4553],{"type":398,"value":614},{"type":393,"tag":581,"props":4555,"children":4556},{"class":583,"line":110},[4557,4561,4565,4570],{"type":393,"tag":581,"props":4558,"children":4559},{"style":708},[4560],{"type":398,"value":857},{"type":393,"tag":581,"props":4562,"children":4563},{"style":593},[4564],{"type":398,"value":862},{"type":393,"tag":581,"props":4566,"children":4567},{"style":647},[4568],{"type":398,"value":4569},"\"Student Performance:\"",{"type":393,"tag":581,"props":4571,"children":4572},{"style":593},[4573],{"type":398,"value":872},{"type":393,"tag":581,"props":4575,"children":4576},{"class":583,"line":121},[4577,4581],{"type":393,"tag":581,"props":4578,"children":4579},{"style":708},[4580],{"type":398,"value":857},{"type":393,"tag":581,"props":4582,"children":4583},{"style":593},[4584],{"type":398,"value":4585},"(students)\n",{"type":393,"tag":581,"props":4587,"children":4588},{"class":583,"line":130},[4589,4593],{"type":393,"tag":581,"props":4590,"children":4591},{"style":708},[4592],{"type":398,"value":857},{"type":393,"tag":581,"props":4594,"children":4595},{"style":593},[4596],{"type":398,"value":896},{"type":393,"tag":581,"props":4598,"children":4599},{"class":583,"line":139},[4600],{"type":393,"tag":581,"props":4601,"children":4602},{"emptyLinePlaceholder":12},[4603],{"type":398,"value":614},{"type":393,"tag":581,"props":4605,"children":4606},{"class":583,"line":148},[4607,4611,4615,4620],{"type":393,"tag":581,"props":4608,"children":4609},{"style":708},[4610],{"type":398,"value":857},{"type":393,"tag":581,"props":4612,"children":4613},{"style":593},[4614],{"type":398,"value":862},{"type":393,"tag":581,"props":4616,"children":4617},{"style":647},[4618],{"type":398,"value":4619},"\"🔧 Advanced Techniques:\"",{"type":393,"tag":581,"props":4621,"children":4622},{"style":593},[4623],{"type":398,"value":872},{"type":393,"tag":581,"props":4625,"children":4626},{"class":583,"line":159},[4627,4631],{"type":393,"tag":581,"props":4628,"children":4629},{"style":708},[4630],{"type":398,"value":857},{"type":393,"tag":581,"props":4632,"children":4633},{"style":593},[4634],{"type":398,"value":896},{"type":393,"tag":581,"props":4636,"children":4637},{"class":583,"line":168},[4638],{"type":393,"tag":581,"props":4639,"children":4640},{"emptyLinePlaceholder":12},[4641],{"type":398,"value":614},{"type":393,"tag":581,"props":4643,"children":4644},{"class":583,"line":177},[4645,4649,4653,4658],{"type":393,"tag":581,"props":4646,"children":4647},{"style":708},[4648],{"type":398,"value":857},{"type":393,"tag":581,"props":4650,"children":4651},{"style":593},[4652],{"type":398,"value":862},{"type":393,"tag":581,"props":4654,"children":4655},{"style":647},[4656],{"type":398,"value":4657},"\"1️⃣ High performers (score > 85) - names only:\"",{"type":393,"tag":581,"props":4659,"children":4660},{"style":593},[4661],{"type":398,"value":872},{"type":393,"tag":581,"props":4663,"children":4664},{"class":583,"line":186},[4665,4670,4674,4679,4684,4689,4694,4699,4703,4708],{"type":393,"tag":581,"props":4666,"children":4667},{"style":593},[4668],{"type":398,"value":4669},"high_performers ",{"type":393,"tag":581,"props":4671,"children":4672},{"style":587},[4673],{"type":398,"value":636},{"type":393,"tag":581,"props":4675,"children":4676},{"style":593},[4677],{"type":398,"value":4678}," students.loc[students[",{"type":393,"tag":581,"props":4680,"children":4681},{"style":647},[4682],{"type":398,"value":4683},"'score'",{"type":393,"tag":581,"props":4685,"children":4686},{"style":593},[4687],{"type":398,"value":4688},"] ",{"type":393,"tag":581,"props":4690,"children":4691},{"style":587},[4692],{"type":398,"value":4693},">",{"type":393,"tag":581,"props":4695,"children":4696},{"style":708},[4697],{"type":398,"value":4698}," 85",{"type":393,"tag":581,"props":4700,"children":4701},{"style":593},[4702],{"type":398,"value":665},{"type":393,"tag":581,"props":4704,"children":4705},{"style":647},[4706],{"type":398,"value":4707},"'name'",{"type":393,"tag":581,"props":4709,"children":4710},{"style":593},[4711],{"type":398,"value":834},{"type":393,"tag":581,"props":4713,"children":4714},{"class":583,"line":197},[4715,4719,4723,4728],{"type":393,"tag":581,"props":4716,"children":4717},{"style":708},[4718],{"type":398,"value":857},{"type":393,"tag":581,"props":4720,"children":4721},{"style":593},[4722],{"type":398,"value":862},{"type":393,"tag":581,"props":4724,"children":4725},{"style":708},[4726],{"type":398,"value":4727},"list",{"type":393,"tag":581,"props":4729,"children":4730},{"style":593},[4731],{"type":398,"value":4732},"(high_performers))\n",{"type":393,"tag":581,"props":4734,"children":4735},{"class":583,"line":206},[4736,4740],{"type":393,"tag":581,"props":4737,"children":4738},{"style":708},[4739],{"type":398,"value":857},{"type":393,"tag":581,"props":4741,"children":4742},{"style":593},[4743],{"type":398,"value":896},{"type":393,"tag":581,"props":4745,"children":4746},{"class":583,"line":215},[4747],{"type":393,"tag":581,"props":4748,"children":4749},{"emptyLinePlaceholder":12},[4750],{"type":398,"value":614},{"type":393,"tag":581,"props":4752,"children":4753},{"class":583,"line":224},[4754,4758,4762,4767],{"type":393,"tag":581,"props":4755,"children":4756},{"style":708},[4757],{"type":398,"value":857},{"type":393,"tag":581,"props":4759,"children":4760},{"style":593},[4761],{"type":398,"value":862},{"type":393,"tag":581,"props":4763,"children":4764},{"style":647},[4765],{"type":398,"value":4766},"\"2️⃣ Grade A students - all info:\"",{"type":393,"tag":581,"props":4768,"children":4769},{"style":593},[4770],{"type":398,"value":872},{"type":393,"tag":581,"props":4772,"children":4773},{"class":583,"line":233},[4774,4779,4783,4787,4792,4796,4801,4806],{"type":393,"tag":581,"props":4775,"children":4776},{"style":593},[4777],{"type":398,"value":4778},"grade_a ",{"type":393,"tag":581,"props":4780,"children":4781},{"style":587},[4782],{"type":398,"value":636},{"type":393,"tag":581,"props":4784,"children":4785},{"style":593},[4786],{"type":398,"value":4678},{"type":393,"tag":581,"props":4788,"children":4789},{"style":647},[4790],{"type":398,"value":4791},"'grade'",{"type":393,"tag":581,"props":4793,"children":4794},{"style":593},[4795],{"type":398,"value":4688},{"type":393,"tag":581,"props":4797,"children":4798},{"style":587},[4799],{"type":398,"value":4800},"==",{"type":393,"tag":581,"props":4802,"children":4803},{"style":647},[4804],{"type":398,"value":4805}," 'A'",{"type":393,"tag":581,"props":4807,"children":4808},{"style":593},[4809],{"type":398,"value":834},{"type":393,"tag":581,"props":4811,"children":4812},{"class":583,"line":244},[4813,4817],{"type":393,"tag":581,"props":4814,"children":4815},{"style":708},[4816],{"type":398,"value":857},{"type":393,"tag":581,"props":4818,"children":4819},{"style":593},[4820],{"type":398,"value":4821},"(grade_a)\n",{"type":393,"tag":581,"props":4823,"children":4824},{"class":583,"line":253},[4825,4829],{"type":393,"tag":581,"props":4826,"children":4827},{"style":708},[4828],{"type":398,"value":857},{"type":393,"tag":581,"props":4830,"children":4831},{"style":593},[4832],{"type":398,"value":896},{"type":393,"tag":581,"props":4834,"children":4835},{"class":583,"line":262},[4836],{"type":393,"tag":581,"props":4837,"children":4838},{"emptyLinePlaceholder":12},[4839],{"type":398,"value":614},{"type":393,"tag":581,"props":4841,"children":4842},{"class":583,"line":271},[4843,4847,4851,4856],{"type":393,"tag":581,"props":4844,"children":4845},{"style":708},[4846],{"type":398,"value":857},{"type":393,"tag":581,"props":4848,"children":4849},{"style":593},[4850],{"type":398,"value":862},{"type":393,"tag":581,"props":4852,"children":4853},{"style":647},[4854],{"type":398,"value":4855},"\"3️⃣ Good attendance (>90) - names and scores:\"",{"type":393,"tag":581,"props":4857,"children":4858},{"style":593},[4859],{"type":398,"value":872},{"type":393,"tag":581,"props":4861,"children":4862},{"class":583,"line":281},[4863,4868,4872],{"type":393,"tag":581,"props":4864,"children":4865},{"style":593},[4866],{"type":398,"value":4867},"good_attendance ",{"type":393,"tag":581,"props":4869,"children":4870},{"style":587},[4871],{"type":398,"value":636},{"type":393,"tag":581,"props":4873,"children":4874},{"style":593},[4875],{"type":398,"value":4876}," students.loc[\n",{"type":393,"tag":581,"props":4878,"children":4879},{"class":583,"line":290},[4880,4885,4890,4894,4898,4903],{"type":393,"tag":581,"props":4881,"children":4882},{"style":593},[4883],{"type":398,"value":4884},"    students[",{"type":393,"tag":581,"props":4886,"children":4887},{"style":647},[4888],{"type":398,"value":4889},"'attendance'",{"type":393,"tag":581,"props":4891,"children":4892},{"style":593},[4893],{"type":398,"value":4688},{"type":393,"tag":581,"props":4895,"children":4896},{"style":587},[4897],{"type":398,"value":4693},{"type":393,"tag":581,"props":4899,"children":4900},{"style":708},[4901],{"type":398,"value":4902}," 90",{"type":393,"tag":581,"props":4904,"children":4905},{"style":593},[4906],{"type":398,"value":4907},", \n",{"type":393,"tag":581,"props":4909,"children":4910},{"class":583,"line":299},[4911,4916,4920,4924,4928],{"type":393,"tag":581,"props":4912,"children":4913},{"style":593},[4914],{"type":398,"value":4915},"    [",{"type":393,"tag":581,"props":4917,"children":4918},{"style":647},[4919],{"type":398,"value":4707},{"type":393,"tag":581,"props":4921,"children":4922},{"style":593},[4923],{"type":398,"value":665},{"type":393,"tag":581,"props":4925,"children":4926},{"style":647},[4927],{"type":398,"value":4683},{"type":393,"tag":581,"props":4929,"children":4930},{"style":593},[4931],{"type":398,"value":834},{"type":393,"tag":581,"props":4933,"children":4934},{"class":583,"line":308},[4935],{"type":393,"tag":581,"props":4936,"children":4937},{"style":593},[4938],{"type":398,"value":834},{"type":393,"tag":581,"props":4940,"children":4941},{"class":583,"line":318},[4942,4946],{"type":393,"tag":581,"props":4943,"children":4944},{"style":708},[4945],{"type":398,"value":857},{"type":393,"tag":581,"props":4947,"children":4948},{"style":593},[4949],{"type":398,"value":4950},"(good_attendance)\n",{"type":393,"tag":581,"props":4952,"children":4953},{"class":583,"line":327},[4954,4958],{"type":393,"tag":581,"props":4955,"children":4956},{"style":708},[4957],{"type":398,"value":857},{"type":393,"tag":581,"props":4959,"children":4960},{"style":593},[4961],{"type":398,"value":896},{"type":393,"tag":581,"props":4963,"children":4964},{"class":583,"line":336},[4965],{"type":393,"tag":581,"props":4966,"children":4967},{"emptyLinePlaceholder":12},[4968],{"type":398,"value":614},{"type":393,"tag":581,"props":4970,"children":4971},{"class":583,"line":346},[4972,4976,4980,4985],{"type":393,"tag":581,"props":4973,"children":4974},{"style":708},[4975],{"type":398,"value":857},{"type":393,"tag":581,"props":4977,"children":4978},{"style":593},[4979],{"type":398,"value":862},{"type":393,"tag":581,"props":4981,"children":4982},{"style":647},[4983],{"type":398,"value":4984},"\"4️⃣ Multiple conditions - A grade OR score > 85:\"",{"type":393,"tag":581,"props":4986,"children":4987},{"style":593},[4988],{"type":398,"value":872},{"type":393,"tag":581,"props":4990,"children":4991},{"class":583,"line":355},[4992,4997,5001],{"type":393,"tag":581,"props":4993,"children":4994},{"style":593},[4995],{"type":398,"value":4996},"top_students ",{"type":393,"tag":581,"props":4998,"children":4999},{"style":587},[5000],{"type":398,"value":636},{"type":393,"tag":581,"props":5002,"children":5003},{"style":593},[5004],{"type":398,"value":4876},{"type":393,"tag":581,"props":5006,"children":5007},{"class":583,"line":364},[5008,5013,5017,5021,5025,5029,5034,5039,5044,5048,5052,5056,5060],{"type":393,"tag":581,"props":5009,"children":5010},{"style":593},[5011],{"type":398,"value":5012},"    (students[",{"type":393,"tag":581,"props":5014,"children":5015},{"style":647},[5016],{"type":398,"value":4791},{"type":393,"tag":581,"props":5018,"children":5019},{"style":593},[5020],{"type":398,"value":4688},{"type":393,"tag":581,"props":5022,"children":5023},{"style":587},[5024],{"type":398,"value":4800},{"type":393,"tag":581,"props":5026,"children":5027},{"style":647},[5028],{"type":398,"value":4805},{"type":393,"tag":581,"props":5030,"children":5031},{"style":593},[5032],{"type":398,"value":5033},") ",{"type":393,"tag":581,"props":5035,"children":5036},{"style":587},[5037],{"type":398,"value":5038},"|",{"type":393,"tag":581,"props":5040,"children":5041},{"style":593},[5042],{"type":398,"value":5043}," (students[",{"type":393,"tag":581,"props":5045,"children":5046},{"style":647},[5047],{"type":398,"value":4683},{"type":393,"tag":581,"props":5049,"children":5050},{"style":593},[5051],{"type":398,"value":4688},{"type":393,"tag":581,"props":5053,"children":5054},{"style":587},[5055],{"type":398,"value":4693},{"type":393,"tag":581,"props":5057,"children":5058},{"style":708},[5059],{"type":398,"value":4698},{"type":393,"tag":581,"props":5061,"children":5062},{"style":593},[5063],{"type":398,"value":872},{"type":393,"tag":581,"props":5065,"children":5066},{"class":583,"line":374},[5067],{"type":393,"tag":581,"props":5068,"children":5069},{"style":593},[5070],{"type":398,"value":834},{"type":393,"tag":581,"props":5072,"children":5073},{"class":583,"line":383},[5074,5078,5083,5087,5091,5095,5099,5103],{"type":393,"tag":581,"props":5075,"children":5076},{"style":708},[5077],{"type":398,"value":857},{"type":393,"tag":581,"props":5079,"children":5080},{"style":593},[5081],{"type":398,"value":5082},"(top_students[[",{"type":393,"tag":581,"props":5084,"children":5085},{"style":647},[5086],{"type":398,"value":4707},{"type":393,"tag":581,"props":5088,"children":5089},{"style":593},[5090],{"type":398,"value":665},{"type":393,"tag":581,"props":5092,"children":5093},{"style":647},[5094],{"type":398,"value":4791},{"type":393,"tag":581,"props":5096,"children":5097},{"style":593},[5098],{"type":398,"value":665},{"type":393,"tag":581,"props":5100,"children":5101},{"style":647},[5102],{"type":398,"value":4683},{"type":393,"tag":581,"props":5104,"children":5105},{"style":593},[5106],{"type":398,"value":1831},{"type":393,"tag":550,"props":5108,"children":5110},{"id":5109},"loc-and-iloc-reference-guide",[5111],{"type":398,"value":5112},"📋 loc and iloc Reference Guide",{"type":393,"tag":5114,"props":5115,"children":5116},"table",{},[5117,5141],{"type":393,"tag":5118,"props":5119,"children":5120},"thead",{},[5121],{"type":393,"tag":5122,"props":5123,"children":5124},"tr",{},[5125,5131,5136],{"type":393,"tag":5126,"props":5127,"children":5128},"th",{},[5129],{"type":398,"value":5130},"Task",{"type":393,"tag":5126,"props":5132,"children":5133},{},[5134],{"type":398,"value":5135},"loc (Label-based)",{"type":393,"tag":5126,"props":5137,"children":5138},{},[5139],{"type":398,"value":5140},"iloc (Position-based)",{"type":393,"tag":5142,"props":5143,"children":5144},"tbody",{},[5145,5170,5196,5222,5248,5274,5300,5326],{"type":393,"tag":5122,"props":5146,"children":5147},{},[5148,5154,5162],{"type":393,"tag":5149,"props":5150,"children":5151},"td",{},[5152],{"type":398,"value":5153},"Single cell",{"type":393,"tag":5149,"props":5155,"children":5156},{},[5157],{"type":393,"tag":405,"props":5158,"children":5160},{"className":5159},[],[5161],{"type":398,"value":468},{"type":393,"tag":5149,"props":5163,"children":5164},{},[5165],{"type":393,"tag":405,"props":5166,"children":5168},{"className":5167},[],[5169],{"type":398,"value":512},{"type":393,"tag":5122,"props":5171,"children":5172},{},[5173,5178,5187],{"type":393,"tag":5149,"props":5174,"children":5175},{},[5176],{"type":398,"value":5177},"Single row",{"type":393,"tag":5149,"props":5179,"children":5180},{},[5181],{"type":393,"tag":405,"props":5182,"children":5184},{"className":5183},[],[5185],{"type":398,"value":5186},"df.loc[0]",{"type":393,"tag":5149,"props":5188,"children":5189},{},[5190],{"type":393,"tag":405,"props":5191,"children":5193},{"className":5192},[],[5194],{"type":398,"value":5195},"df.iloc[0]",{"type":393,"tag":5122,"props":5197,"children":5198},{},[5199,5204,5213],{"type":393,"tag":5149,"props":5200,"children":5201},{},[5202],{"type":398,"value":5203},"Single column",{"type":393,"tag":5149,"props":5205,"children":5206},{},[5207],{"type":393,"tag":405,"props":5208,"children":5210},{"className":5209},[],[5211],{"type":398,"value":5212},"df.loc[:, 'name']",{"type":393,"tag":5149,"props":5214,"children":5215},{},[5216],{"type":393,"tag":405,"props":5217,"children":5219},{"className":5218},[],[5220],{"type":398,"value":5221},"df.iloc[:, 1]",{"type":393,"tag":5122,"props":5223,"children":5224},{},[5225,5230,5239],{"type":393,"tag":5149,"props":5226,"children":5227},{},[5228],{"type":398,"value":5229},"Row range",{"type":393,"tag":5149,"props":5231,"children":5232},{},[5233],{"type":393,"tag":405,"props":5234,"children":5236},{"className":5235},[],[5237],{"type":398,"value":5238},"df.loc[0:2]",{"type":393,"tag":5149,"props":5240,"children":5241},{},[5242],{"type":393,"tag":405,"props":5243,"children":5245},{"className":5244},[],[5246],{"type":398,"value":5247},"df.iloc[0:3]",{"type":393,"tag":5122,"props":5249,"children":5250},{},[5251,5256,5265],{"type":393,"tag":5149,"props":5252,"children":5253},{},[5254],{"type":398,"value":5255},"Column range",{"type":393,"tag":5149,"props":5257,"children":5258},{},[5259],{"type":393,"tag":405,"props":5260,"children":5262},{"className":5261},[],[5263],{"type":398,"value":5264},"df.loc[:, 'name':'age']",{"type":393,"tag":5149,"props":5266,"children":5267},{},[5268],{"type":393,"tag":405,"props":5269,"children":5271},{"className":5270},[],[5272],{"type":398,"value":5273},"df.iloc[:, 1:3]",{"type":393,"tag":5122,"props":5275,"children":5276},{},[5277,5282,5291],{"type":393,"tag":5149,"props":5278,"children":5279},{},[5280],{"type":398,"value":5281},"Specific rows/cols",{"type":393,"tag":5149,"props":5283,"children":5284},{},[5285],{"type":393,"tag":405,"props":5286,"children":5288},{"className":5287},[],[5289],{"type":398,"value":5290},"df.loc[[0,2], ['name','age']]",{"type":393,"tag":5149,"props":5292,"children":5293},{},[5294],{"type":393,"tag":405,"props":5295,"children":5297},{"className":5296},[],[5298],{"type":398,"value":5299},"df.iloc[[0,2], [1,3]]",{"type":393,"tag":5122,"props":5301,"children":5302},{},[5303,5308,5317],{"type":393,"tag":5149,"props":5304,"children":5305},{},[5306],{"type":398,"value":5307},"Last row",{"type":393,"tag":5149,"props":5309,"children":5310},{},[5311],{"type":393,"tag":405,"props":5312,"children":5314},{"className":5313},[],[5315],{"type":398,"value":5316},"df.loc[df.index[-1]]",{"type":393,"tag":5149,"props":5318,"children":5319},{},[5320],{"type":393,"tag":405,"props":5321,"children":5323},{"className":5322},[],[5324],{"type":398,"value":5325},"df.iloc[-1]",{"type":393,"tag":5122,"props":5327,"children":5328},{},[5329,5334,5343],{"type":393,"tag":5149,"props":5330,"children":5331},{},[5332],{"type":398,"value":5333},"Conditional",{"type":393,"tag":5149,"props":5335,"children":5336},{},[5337],{"type":393,"tag":405,"props":5338,"children":5340},{"className":5339},[],[5341],{"type":398,"value":5342},"df.loc[df['age'] > 30]",{"type":393,"tag":5149,"props":5344,"children":5345},{},[5346],{"type":398,"value":5347},"Not applicable",{"type":393,"tag":550,"props":5349,"children":5351},{"id":5350},"️-common-mistakes",[5352],{"type":398,"value":5353},"⚠️ Common Mistakes",{"type":393,"tag":401,"props":5355,"children":5356},{},[5357],{"type":398,"value":5358},"Avoid these loc/iloc pitfalls that can cause errors:",{"type":393,"tag":422,"props":5360,"children":5364},{"emoji":5361,"title":5362,"type":5363},"⚠️","loc and iloc Common Mistakes","warning",[5365,5373,5414,5422,5448,5456,5480,5488,5523,5531,5582],{"type":393,"tag":401,"props":5366,"children":5367},{},[5368],{"type":393,"tag":432,"props":5369,"children":5370},{},[5371],{"type":398,"value":5372},"1. Mixing Up loc and iloc",{"type":393,"tag":438,"props":5374,"children":5375},{},[5376,5389,5402],{"type":393,"tag":442,"props":5377,"children":5378},{},[5379,5381,5387],{"type":398,"value":5380},"❌ Wrong: ",{"type":393,"tag":405,"props":5382,"children":5384},{"className":5383},[],[5385],{"type":398,"value":5386},"data.iloc[0, 'name']",{"type":398,"value":5388}," - Using column names with iloc",{"type":393,"tag":442,"props":5390,"children":5391},{},[5392,5394,5400],{"type":398,"value":5393},"✅ Correct: ",{"type":393,"tag":405,"props":5395,"children":5397},{"className":5396},[],[5398],{"type":398,"value":5399},"data.loc[0, 'name']",{"type":398,"value":5401}," - Use loc for labels",{"type":393,"tag":442,"props":5403,"children":5404},{},[5405,5406,5412],{"type":398,"value":5393},{"type":393,"tag":405,"props":5407,"children":5409},{"className":5408},[],[5410],{"type":398,"value":5411},"data.iloc[0, 0]",{"type":398,"value":5413}," - Use iloc for positions",{"type":393,"tag":401,"props":5415,"children":5416},{},[5417],{"type":393,"tag":432,"props":5418,"children":5419},{},[5420],{"type":398,"value":5421},"2. Forgetting the Comma",{"type":393,"tag":438,"props":5423,"children":5424},{},[5425,5437],{"type":393,"tag":442,"props":5426,"children":5427},{},[5428,5429,5435],{"type":398,"value":5380},{"type":393,"tag":405,"props":5430,"children":5432},{"className":5431},[],[5433],{"type":398,"value":5434},"data.loc[0 'name']",{"type":398,"value":5436}," - Missing comma between row and column",{"type":393,"tag":442,"props":5438,"children":5439},{},[5440,5441,5446],{"type":398,"value":5393},{"type":393,"tag":405,"props":5442,"children":5444},{"className":5443},[],[5445],{"type":398,"value":5399},{"type":398,"value":5447}," - Always separate row and column with comma",{"type":393,"tag":401,"props":5449,"children":5450},{},[5451],{"type":393,"tag":432,"props":5452,"children":5453},{},[5454],{"type":398,"value":5455},"3. Wrong Method for Your Data",{"type":393,"tag":438,"props":5457,"children":5458},{},[5459,5470],{"type":393,"tag":442,"props":5460,"children":5461},{},[5462,5464,5468],{"type":398,"value":5463},"Use ",{"type":393,"tag":432,"props":5465,"children":5466},{},[5467],{"type":398,"value":410},{"type":398,"value":5469}," when you know column names and want conditional selection",{"type":393,"tag":442,"props":5471,"children":5472},{},[5473,5474,5478],{"type":398,"value":5463},{"type":393,"tag":432,"props":5475,"children":5476},{},[5477],{"type":398,"value":418},{"type":398,"value":5479}," when you know exact positions and want positional selection",{"type":393,"tag":401,"props":5481,"children":5482},{},[5483],{"type":393,"tag":432,"props":5484,"children":5485},{},[5486],{"type":398,"value":5487},"4. Range Confusion",{"type":393,"tag":438,"props":5489,"children":5490},{},[5491,5507],{"type":393,"tag":442,"props":5492,"children":5493},{},[5494,5498,5499,5505],{"type":393,"tag":432,"props":5495,"children":5496},{},[5497],{"type":398,"value":418},{"type":398,"value":3826},{"type":393,"tag":405,"props":5500,"children":5502},{"className":5501},[],[5503],{"type":398,"value":5504},"[1:4]",{"type":398,"value":5506}," means positions 1, 2, 3 (excludes 4)",{"type":393,"tag":442,"props":5508,"children":5509},{},[5510,5514,5515,5521],{"type":393,"tag":432,"props":5511,"children":5512},{},[5513],{"type":398,"value":410},{"type":398,"value":3826},{"type":393,"tag":405,"props":5516,"children":5518},{"className":5517},[],[5519],{"type":398,"value":5520},"[1:3]",{"type":398,"value":5522}," means indices 1, 2, 3 (includes 3)",{"type":393,"tag":401,"props":5524,"children":5525},{},[5526],{"type":393,"tag":432,"props":5527,"children":5528},{},[5529],{"type":398,"value":5530},"Key Reminders:",{"type":393,"tag":438,"props":5532,"children":5533},{},[5534,5550,5571],{"type":393,"tag":442,"props":5535,"children":5536},{},[5537,5541,5543,5548],{"type":393,"tag":432,"props":5538,"children":5539},{},[5540],{"type":398,"value":410},{"type":398,"value":5542}," = ",{"type":393,"tag":432,"props":5544,"children":5545},{},[5546],{"type":398,"value":5547},"L",{"type":398,"value":5549},"abels (column names, index labels)",{"type":393,"tag":442,"props":5551,"children":5552},{},[5553,5557,5558,5563,5565,5569],{"type":393,"tag":432,"props":5554,"children":5555},{},[5556],{"type":398,"value":418},{"type":398,"value":5542},{"type":393,"tag":432,"props":5559,"children":5560},{},[5561],{"type":398,"value":5562},"i",{"type":398,"value":5564},"nteger ",{"type":393,"tag":432,"props":5566,"children":5567},{},[5568],{"type":398,"value":410},{"type":398,"value":5570},"ation (0, 1, 2... positions)",{"type":393,"tag":442,"props":5572,"children":5573},{},[5574,5576],{"type":398,"value":5575},"Always use the format: ",{"type":393,"tag":405,"props":5577,"children":5579},{"className":5578},[],[5580],{"type":398,"value":5581},"[row_selection, column_selection]",{"type":393,"tag":401,"props":5583,"children":5584},{},[5585,5590],{"type":393,"tag":432,"props":5586,"children":5587},{},[5588],{"type":398,"value":5589},"Remember:",{"type":398,"value":5591}," Choose the right tool - loc for labels, iloc for positions!",{"type":393,"tag":567,"props":5593,"children":5594},{},[5595],{"type":393,"tag":571,"props":5596,"children":5598},{"className":573,"code":5597,"language":575,"meta":6,"style":6},"import pandas as pd\n\n# Sample data for demonstrating correct usage\ndata = pd.DataFrame({\n    'name': ['Alice', 'Bob', 'Charlie'],\n    'age': [25, 30, 35],\n    'city': ['NYC', 'LA', 'Chicago']\n})\n\nprint(\"✅ Correct loc and iloc Usage:\")\nprint()\n\nprint(\"Using loc with labels:\")\nresult_loc = data.loc[0, 'name']\nprint(f\"data.loc[0, 'name'] = {result_loc}\")\nprint()\n\nprint(\"Using iloc with positions:\")\nresult_iloc = data.iloc[0, 0]  # Row 0, Column 0\nprint(f\"data.iloc[0, 0] = {result_iloc}\")\nprint()\n\nprint(\"Complex selection with loc:\")\nfiltered = data.loc[data['age'] > 25, ['name', 'city']]\nprint(\"People over 25 - names and cities:\")\nprint(filtered)\nprint()\n\nprint(\"Position-based selection with iloc:\")\nfirst_two_rows = data.iloc[0:2, 1:3]  # First 2 rows, columns 1-2\nprint(\"First 2 rows, age and city columns:\")\nprint(first_two_rows)\n",[5599],{"type":393,"tag":405,"props":5600,"children":5601},{"__ignoreMap":6},[5602,5621,5628,5636,5652,5687,5722,5761,5768,5775,5795,5806,5813,5833,5866,5907,5918,5925,5945,5983,6024,6035,6042,6062,6117,6137,6149,6160,6167,6187,6240,6260],{"type":393,"tag":581,"props":5603,"children":5604},{"class":583,"line":11},[5605,5609,5613,5617],{"type":393,"tag":581,"props":5606,"children":5607},{"style":587},[5608],{"type":398,"value":590},{"type":393,"tag":581,"props":5610,"children":5611},{"style":593},[5612],{"type":398,"value":596},{"type":393,"tag":581,"props":5614,"children":5615},{"style":587},[5616],{"type":398,"value":601},{"type":393,"tag":581,"props":5618,"children":5619},{"style":593},[5620],{"type":398,"value":606},{"type":393,"tag":581,"props":5622,"children":5623},{"class":583,"line":27},[5624],{"type":393,"tag":581,"props":5625,"children":5626},{"emptyLinePlaceholder":12},[5627],{"type":398,"value":614},{"type":393,"tag":581,"props":5629,"children":5630},{"class":583,"line":36},[5631],{"type":393,"tag":581,"props":5632,"children":5633},{"style":620},[5634],{"type":398,"value":5635},"# Sample data for demonstrating correct usage\n",{"type":393,"tag":581,"props":5637,"children":5638},{"class":583,"line":45},[5639,5644,5648],{"type":393,"tag":581,"props":5640,"children":5641},{"style":593},[5642],{"type":398,"value":5643},"data ",{"type":393,"tag":581,"props":5645,"children":5646},{"style":587},[5647],{"type":398,"value":636},{"type":393,"tag":581,"props":5649,"children":5650},{"style":593},[5651],{"type":398,"value":641},{"type":393,"tag":581,"props":5653,"children":5654},{"class":583,"line":54},[5655,5659,5663,5667,5671,5675,5679,5683],{"type":393,"tag":581,"props":5656,"children":5657},{"style":647},[5658],{"type":398,"value":650},{"type":393,"tag":581,"props":5660,"children":5661},{"style":593},[5662],{"type":398,"value":655},{"type":393,"tag":581,"props":5664,"children":5665},{"style":647},[5666],{"type":398,"value":660},{"type":393,"tag":581,"props":5668,"children":5669},{"style":593},[5670],{"type":398,"value":665},{"type":393,"tag":581,"props":5672,"children":5673},{"style":647},[5674],{"type":398,"value":670},{"type":393,"tag":581,"props":5676,"children":5677},{"style":593},[5678],{"type":398,"value":665},{"type":393,"tag":581,"props":5680,"children":5681},{"style":647},[5682],{"type":398,"value":679},{"type":393,"tag":581,"props":5684,"children":5685},{"style":593},[5686],{"type":398,"value":693},{"type":393,"tag":581,"props":5688,"children":5689},{"class":583,"line":63},[5690,5694,5698,5702,5706,5710,5714,5718],{"type":393,"tag":581,"props":5691,"children":5692},{"style":647},[5693],{"type":398,"value":2736},{"type":393,"tag":581,"props":5695,"children":5696},{"style":593},[5697],{"type":398,"value":655},{"type":393,"tag":581,"props":5699,"children":5700},{"style":708},[5701],{"type":398,"value":1410},{"type":393,"tag":581,"props":5703,"children":5704},{"style":593},[5705],{"type":398,"value":665},{"type":393,"tag":581,"props":5707,"children":5708},{"style":708},[5709],{"type":398,"value":2753},{"type":393,"tag":581,"props":5711,"children":5712},{"style":593},[5713],{"type":398,"value":665},{"type":393,"tag":581,"props":5715,"children":5716},{"style":708},[5717],{"type":398,"value":2762},{"type":393,"tag":581,"props":5719,"children":5720},{"style":593},[5721],{"type":398,"value":693},{"type":393,"tag":581,"props":5723,"children":5724},{"class":583,"line":72},[5725,5730,5734,5739,5743,5748,5752,5757],{"type":393,"tag":581,"props":5726,"children":5727},{"style":647},[5728],{"type":398,"value":5729},"    'city'",{"type":393,"tag":581,"props":5731,"children":5732},{"style":593},[5733],{"type":398,"value":655},{"type":393,"tag":581,"props":5735,"children":5736},{"style":647},[5737],{"type":398,"value":5738},"'NYC'",{"type":393,"tag":581,"props":5740,"children":5741},{"style":593},[5742],{"type":398,"value":665},{"type":393,"tag":581,"props":5744,"children":5745},{"style":647},[5746],{"type":398,"value":5747},"'LA'",{"type":393,"tag":581,"props":5749,"children":5750},{"style":593},[5751],{"type":398,"value":665},{"type":393,"tag":581,"props":5753,"children":5754},{"style":647},[5755],{"type":398,"value":5756},"'Chicago'",{"type":393,"tag":581,"props":5758,"children":5759},{"style":593},[5760],{"type":398,"value":834},{"type":393,"tag":581,"props":5762,"children":5763},{"class":583,"line":83},[5764],{"type":393,"tag":581,"props":5765,"children":5766},{"style":593},[5767],{"type":398,"value":842},{"type":393,"tag":581,"props":5769,"children":5770},{"class":583,"line":92},[5771],{"type":393,"tag":581,"props":5772,"children":5773},{"emptyLinePlaceholder":12},[5774],{"type":398,"value":614},{"type":393,"tag":581,"props":5776,"children":5777},{"class":583,"line":101},[5778,5782,5786,5791],{"type":393,"tag":581,"props":5779,"children":5780},{"style":708},[5781],{"type":398,"value":857},{"type":393,"tag":581,"props":5783,"children":5784},{"style":593},[5785],{"type":398,"value":862},{"type":393,"tag":581,"props":5787,"children":5788},{"style":647},[5789],{"type":398,"value":5790},"\"✅ Correct loc and iloc Usage:\"",{"type":393,"tag":581,"props":5792,"children":5793},{"style":593},[5794],{"type":398,"value":872},{"type":393,"tag":581,"props":5796,"children":5797},{"class":583,"line":110},[5798,5802],{"type":393,"tag":581,"props":5799,"children":5800},{"style":708},[5801],{"type":398,"value":857},{"type":393,"tag":581,"props":5803,"children":5804},{"style":593},[5805],{"type":398,"value":896},{"type":393,"tag":581,"props":5807,"children":5808},{"class":583,"line":121},[5809],{"type":393,"tag":581,"props":5810,"children":5811},{"emptyLinePlaceholder":12},[5812],{"type":398,"value":614},{"type":393,"tag":581,"props":5814,"children":5815},{"class":583,"line":130},[5816,5820,5824,5829],{"type":393,"tag":581,"props":5817,"children":5818},{"style":708},[5819],{"type":398,"value":857},{"type":393,"tag":581,"props":5821,"children":5822},{"style":593},[5823],{"type":398,"value":862},{"type":393,"tag":581,"props":5825,"children":5826},{"style":647},[5827],{"type":398,"value":5828},"\"Using loc with labels:\"",{"type":393,"tag":581,"props":5830,"children":5831},{"style":593},[5832],{"type":398,"value":872},{"type":393,"tag":581,"props":5834,"children":5835},{"class":583,"line":139},[5836,5841,5845,5850,5854,5858,5862],{"type":393,"tag":581,"props":5837,"children":5838},{"style":593},[5839],{"type":398,"value":5840},"result_loc ",{"type":393,"tag":581,"props":5842,"children":5843},{"style":587},[5844],{"type":398,"value":636},{"type":393,"tag":581,"props":5846,"children":5847},{"style":593},[5848],{"type":398,"value":5849}," data.loc[",{"type":393,"tag":581,"props":5851,"children":5852},{"style":708},[5853],{"type":398,"value":986},{"type":393,"tag":581,"props":5855,"children":5856},{"style":593},[5857],{"type":398,"value":665},{"type":393,"tag":581,"props":5859,"children":5860},{"style":647},[5861],{"type":398,"value":4707},{"type":393,"tag":581,"props":5863,"children":5864},{"style":593},[5865],{"type":398,"value":834},{"type":393,"tag":581,"props":5867,"children":5868},{"class":583,"line":148},[5869,5873,5877,5881,5886,5890,5895,5899,5903],{"type":393,"tag":581,"props":5870,"children":5871},{"style":708},[5872],{"type":398,"value":857},{"type":393,"tag":581,"props":5874,"children":5875},{"style":593},[5876],{"type":398,"value":862},{"type":393,"tag":581,"props":5878,"children":5879},{"style":587},[5880],{"type":398,"value":3791},{"type":393,"tag":581,"props":5882,"children":5883},{"style":647},[5884],{"type":398,"value":5885},"\"data.loc[0, 'name'] = ",{"type":393,"tag":581,"props":5887,"children":5888},{"style":708},[5889],{"type":398,"value":3801},{"type":393,"tag":581,"props":5891,"children":5892},{"style":593},[5893],{"type":398,"value":5894},"result_loc",{"type":393,"tag":581,"props":5896,"children":5897},{"style":708},[5898],{"type":398,"value":3821},{"type":393,"tag":581,"props":5900,"children":5901},{"style":647},[5902],{"type":398,"value":3852},{"type":393,"tag":581,"props":5904,"children":5905},{"style":593},[5906],{"type":398,"value":872},{"type":393,"tag":581,"props":5908,"children":5909},{"class":583,"line":159},[5910,5914],{"type":393,"tag":581,"props":5911,"children":5912},{"style":708},[5913],{"type":398,"value":857},{"type":393,"tag":581,"props":5915,"children":5916},{"style":593},[5917],{"type":398,"value":896},{"type":393,"tag":581,"props":5919,"children":5920},{"class":583,"line":168},[5921],{"type":393,"tag":581,"props":5922,"children":5923},{"emptyLinePlaceholder":12},[5924],{"type":398,"value":614},{"type":393,"tag":581,"props":5926,"children":5927},{"class":583,"line":177},[5928,5932,5936,5941],{"type":393,"tag":581,"props":5929,"children":5930},{"style":708},[5931],{"type":398,"value":857},{"type":393,"tag":581,"props":5933,"children":5934},{"style":593},[5935],{"type":398,"value":862},{"type":393,"tag":581,"props":5937,"children":5938},{"style":647},[5939],{"type":398,"value":5940},"\"Using iloc with positions:\"",{"type":393,"tag":581,"props":5942,"children":5943},{"style":593},[5944],{"type":398,"value":872},{"type":393,"tag":581,"props":5946,"children":5947},{"class":583,"line":186},[5948,5953,5957,5962,5966,5970,5974,5978],{"type":393,"tag":581,"props":5949,"children":5950},{"style":593},[5951],{"type":398,"value":5952},"result_iloc ",{"type":393,"tag":581,"props":5954,"children":5955},{"style":587},[5956],{"type":398,"value":636},{"type":393,"tag":581,"props":5958,"children":5959},{"style":593},[5960],{"type":398,"value":5961}," data.iloc[",{"type":393,"tag":581,"props":5963,"children":5964},{"style":708},[5965],{"type":398,"value":986},{"type":393,"tag":581,"props":5967,"children":5968},{"style":593},[5969],{"type":398,"value":665},{"type":393,"tag":581,"props":5971,"children":5972},{"style":708},[5973],{"type":398,"value":986},{"type":393,"tag":581,"props":5975,"children":5976},{"style":593},[5977],{"type":398,"value":3770},{"type":393,"tag":581,"props":5979,"children":5980},{"style":620},[5981],{"type":398,"value":5982},"# Row 0, Column 0\n",{"type":393,"tag":581,"props":5984,"children":5985},{"class":583,"line":197},[5986,5990,5994,5998,6003,6007,6012,6016,6020],{"type":393,"tag":581,"props":5987,"children":5988},{"style":708},[5989],{"type":398,"value":857},{"type":393,"tag":581,"props":5991,"children":5992},{"style":593},[5993],{"type":398,"value":862},{"type":393,"tag":581,"props":5995,"children":5996},{"style":587},[5997],{"type":398,"value":3791},{"type":393,"tag":581,"props":5999,"children":6000},{"style":647},[6001],{"type":398,"value":6002},"\"data.iloc[0, 0] = ",{"type":393,"tag":581,"props":6004,"children":6005},{"style":708},[6006],{"type":398,"value":3801},{"type":393,"tag":581,"props":6008,"children":6009},{"style":593},[6010],{"type":398,"value":6011},"result_iloc",{"type":393,"tag":581,"props":6013,"children":6014},{"style":708},[6015],{"type":398,"value":3821},{"type":393,"tag":581,"props":6017,"children":6018},{"style":647},[6019],{"type":398,"value":3852},{"type":393,"tag":581,"props":6021,"children":6022},{"style":593},[6023],{"type":398,"value":872},{"type":393,"tag":581,"props":6025,"children":6026},{"class":583,"line":206},[6027,6031],{"type":393,"tag":581,"props":6028,"children":6029},{"style":708},[6030],{"type":398,"value":857},{"type":393,"tag":581,"props":6032,"children":6033},{"style":593},[6034],{"type":398,"value":896},{"type":393,"tag":581,"props":6036,"children":6037},{"class":583,"line":215},[6038],{"type":393,"tag":581,"props":6039,"children":6040},{"emptyLinePlaceholder":12},[6041],{"type":398,"value":614},{"type":393,"tag":581,"props":6043,"children":6044},{"class":583,"line":224},[6045,6049,6053,6058],{"type":393,"tag":581,"props":6046,"children":6047},{"style":708},[6048],{"type":398,"value":857},{"type":393,"tag":581,"props":6050,"children":6051},{"style":593},[6052],{"type":398,"value":862},{"type":393,"tag":581,"props":6054,"children":6055},{"style":647},[6056],{"type":398,"value":6057},"\"Complex selection with loc:\"",{"type":393,"tag":581,"props":6059,"children":6060},{"style":593},[6061],{"type":398,"value":872},{"type":393,"tag":581,"props":6063,"children":6064},{"class":583,"line":233},[6065,6070,6074,6079,6083,6087,6091,6096,6100,6104,6108,6113],{"type":393,"tag":581,"props":6066,"children":6067},{"style":593},[6068],{"type":398,"value":6069},"filtered ",{"type":393,"tag":581,"props":6071,"children":6072},{"style":587},[6073],{"type":398,"value":636},{"type":393,"tag":581,"props":6075,"children":6076},{"style":593},[6077],{"type":398,"value":6078}," data.loc[data[",{"type":393,"tag":581,"props":6080,"children":6081},{"style":647},[6082],{"type":398,"value":3179},{"type":393,"tag":581,"props":6084,"children":6085},{"style":593},[6086],{"type":398,"value":4688},{"type":393,"tag":581,"props":6088,"children":6089},{"style":587},[6090],{"type":398,"value":4693},{"type":393,"tag":581,"props":6092,"children":6093},{"style":708},[6094],{"type":398,"value":6095}," 25",{"type":393,"tag":581,"props":6097,"children":6098},{"style":593},[6099],{"type":398,"value":1813},{"type":393,"tag":581,"props":6101,"children":6102},{"style":647},[6103],{"type":398,"value":4707},{"type":393,"tag":581,"props":6105,"children":6106},{"style":593},[6107],{"type":398,"value":665},{"type":393,"tag":581,"props":6109,"children":6110},{"style":647},[6111],{"type":398,"value":6112},"'city'",{"type":393,"tag":581,"props":6114,"children":6115},{"style":593},[6116],{"type":398,"value":4104},{"type":393,"tag":581,"props":6118,"children":6119},{"class":583,"line":244},[6120,6124,6128,6133],{"type":393,"tag":581,"props":6121,"children":6122},{"style":708},[6123],{"type":398,"value":857},{"type":393,"tag":581,"props":6125,"children":6126},{"style":593},[6127],{"type":398,"value":862},{"type":393,"tag":581,"props":6129,"children":6130},{"style":647},[6131],{"type":398,"value":6132},"\"People over 25 - names and cities:\"",{"type":393,"tag":581,"props":6134,"children":6135},{"style":593},[6136],{"type":398,"value":872},{"type":393,"tag":581,"props":6138,"children":6139},{"class":583,"line":253},[6140,6144],{"type":393,"tag":581,"props":6141,"children":6142},{"style":708},[6143],{"type":398,"value":857},{"type":393,"tag":581,"props":6145,"children":6146},{"style":593},[6147],{"type":398,"value":6148},"(filtered)\n",{"type":393,"tag":581,"props":6150,"children":6151},{"class":583,"line":262},[6152,6156],{"type":393,"tag":581,"props":6153,"children":6154},{"style":708},[6155],{"type":398,"value":857},{"type":393,"tag":581,"props":6157,"children":6158},{"style":593},[6159],{"type":398,"value":896},{"type":393,"tag":581,"props":6161,"children":6162},{"class":583,"line":271},[6163],{"type":393,"tag":581,"props":6164,"children":6165},{"emptyLinePlaceholder":12},[6166],{"type":398,"value":614},{"type":393,"tag":581,"props":6168,"children":6169},{"class":583,"line":281},[6170,6174,6178,6183],{"type":393,"tag":581,"props":6171,"children":6172},{"style":708},[6173],{"type":398,"value":857},{"type":393,"tag":581,"props":6175,"children":6176},{"style":593},[6177],{"type":398,"value":862},{"type":393,"tag":581,"props":6179,"children":6180},{"style":647},[6181],{"type":398,"value":6182},"\"Position-based selection with iloc:\"",{"type":393,"tag":581,"props":6184,"children":6185},{"style":593},[6186],{"type":398,"value":872},{"type":393,"tag":581,"props":6188,"children":6189},{"class":583,"line":290},[6190,6195,6199,6203,6207,6211,6215,6219,6223,6227,6231,6235],{"type":393,"tag":581,"props":6191,"children":6192},{"style":593},[6193],{"type":398,"value":6194},"first_two_rows ",{"type":393,"tag":581,"props":6196,"children":6197},{"style":587},[6198],{"type":398,"value":636},{"type":393,"tag":581,"props":6200,"children":6201},{"style":593},[6202],{"type":398,"value":5961},{"type":393,"tag":581,"props":6204,"children":6205},{"style":708},[6206],{"type":398,"value":986},{"type":393,"tag":581,"props":6208,"children":6209},{"style":593},[6210],{"type":398,"value":1137},{"type":393,"tag":581,"props":6212,"children":6213},{"style":708},[6214],{"type":398,"value":1142},{"type":393,"tag":581,"props":6216,"children":6217},{"style":593},[6218],{"type":398,"value":665},{"type":393,"tag":581,"props":6220,"children":6221},{"style":708},[6222],{"type":398,"value":995},{"type":393,"tag":581,"props":6224,"children":6225},{"style":593},[6226],{"type":398,"value":1137},{"type":393,"tag":581,"props":6228,"children":6229},{"style":708},[6230],{"type":398,"value":1159},{"type":393,"tag":581,"props":6232,"children":6233},{"style":593},[6234],{"type":398,"value":3770},{"type":393,"tag":581,"props":6236,"children":6237},{"style":620},[6238],{"type":398,"value":6239},"# First 2 rows, columns 1-2\n",{"type":393,"tag":581,"props":6241,"children":6242},{"class":583,"line":299},[6243,6247,6251,6256],{"type":393,"tag":581,"props":6244,"children":6245},{"style":708},[6246],{"type":398,"value":857},{"type":393,"tag":581,"props":6248,"children":6249},{"style":593},[6250],{"type":398,"value":862},{"type":393,"tag":581,"props":6252,"children":6253},{"style":647},[6254],{"type":398,"value":6255},"\"First 2 rows, age and city columns:\"",{"type":393,"tag":581,"props":6257,"children":6258},{"style":593},[6259],{"type":398,"value":872},{"type":393,"tag":581,"props":6261,"children":6262},{"class":583,"line":308},[6263,6267],{"type":393,"tag":581,"props":6264,"children":6265},{"style":708},[6266],{"type":398,"value":857},{"type":393,"tag":581,"props":6268,"children":6269},{"style":593},[6270],{"type":398,"value":6271},"(first_two_rows)\n",{"type":393,"tag":550,"props":6273,"children":6275},{"id":6274},"key-takeaways",[6276],{"type":398,"value":6277},"🎯 Key Takeaways",{"type":393,"tag":422,"props":6279,"children":6283},{"emoji":6280,"title":6281,"type":6282},"🎯","loc and iloc Mastery","success",[6284,6292,6313,6321,6347,6355,6386,6394,6448,6456,6501],{"type":393,"tag":401,"props":6285,"children":6286},{},[6287],{"type":393,"tag":432,"props":6288,"children":6289},{},[6290],{"type":398,"value":6291},"When to Use Each:",{"type":393,"tag":438,"props":6293,"children":6294},{},[6295,6304],{"type":393,"tag":442,"props":6296,"children":6297},{},[6298,6302],{"type":393,"tag":432,"props":6299,"children":6300},{},[6301],{"type":398,"value":418},{"type":398,"value":6303},": When you know positions (first 5 rows, last column, etc.)",{"type":393,"tag":442,"props":6305,"children":6306},{},[6307,6311],{"type":393,"tag":432,"props":6308,"children":6309},{},[6310],{"type":398,"value":410},{"type":398,"value":6312},": When you know names (specific columns, conditional selection)",{"type":393,"tag":401,"props":6314,"children":6315},{},[6316],{"type":393,"tag":432,"props":6317,"children":6318},{},[6319],{"type":398,"value":6320},"Syntax Patterns:",{"type":393,"tag":438,"props":6322,"children":6323},{},[6324,6333,6342],{"type":393,"tag":442,"props":6325,"children":6326},{},[6327],{"type":393,"tag":405,"props":6328,"children":6330},{"className":6329},[],[6331],{"type":398,"value":6332},"df.loc[row_indexer, column_indexer]",{"type":393,"tag":442,"props":6334,"children":6335},{},[6336],{"type":393,"tag":405,"props":6337,"children":6339},{"className":6338},[],[6340],{"type":398,"value":6341},"df.iloc[row_indexer, column_indexer]",{"type":393,"tag":442,"props":6343,"children":6344},{},[6345],{"type":398,"value":6346},"Always use a comma to separate row and column selection",{"type":393,"tag":401,"props":6348,"children":6349},{},[6350],{"type":393,"tag":432,"props":6351,"children":6352},{},[6353],{"type":398,"value":6354},"Range Behavior:",{"type":393,"tag":438,"props":6356,"children":6357},{},[6358,6372],{"type":393,"tag":442,"props":6359,"children":6360},{},[6361,6365,6366,6371],{"type":393,"tag":432,"props":6362,"children":6363},{},[6364],{"type":398,"value":418},{"type":398,"value":3826},{"type":393,"tag":405,"props":6367,"children":6369},{"className":6368},[],[6370],{"type":398,"value":5504},{"type":398,"value":5506},{"type":393,"tag":442,"props":6373,"children":6374},{},[6375,6379,6380,6385],{"type":393,"tag":432,"props":6376,"children":6377},{},[6378],{"type":398,"value":410},{"type":398,"value":3826},{"type":393,"tag":405,"props":6381,"children":6383},{"className":6382},[],[6384],{"type":398,"value":5520},{"type":398,"value":5522},{"type":393,"tag":401,"props":6387,"children":6388},{},[6389],{"type":393,"tag":432,"props":6390,"children":6391},{},[6392],{"type":398,"value":6393},"Best Practices:",{"type":393,"tag":438,"props":6395,"children":6396},{},[6397,6412,6430,6435],{"type":393,"tag":442,"props":6398,"children":6399},{},[6400,6401,6405,6407],{"type":398,"value":5463},{"type":393,"tag":432,"props":6402,"children":6403},{},[6404],{"type":398,"value":410},{"type":398,"value":6406}," for conditional selection: ",{"type":393,"tag":405,"props":6408,"children":6410},{"className":6409},[],[6411],{"type":398,"value":5342},{"type":393,"tag":442,"props":6413,"children":6414},{},[6415,6416,6420,6422,6428],{"type":398,"value":5463},{"type":393,"tag":432,"props":6417,"children":6418},{},[6419],{"type":398,"value":418},{"type":398,"value":6421}," for positional patterns: ",{"type":393,"tag":405,"props":6423,"children":6425},{"className":6424},[],[6426],{"type":398,"value":6427},"df.iloc[::2]",{"type":398,"value":6429}," (every other row)",{"type":393,"tag":442,"props":6431,"children":6432},{},[6433],{"type":398,"value":6434},"Combine with column selection for precise data access",{"type":393,"tag":442,"props":6436,"children":6437},{},[6438,6440,6446],{"type":398,"value":6439},"Check your selection with ",{"type":393,"tag":405,"props":6441,"children":6443},{"className":6442},[],[6444],{"type":398,"value":6445},".shape",{"type":398,"value":6447}," to verify results",{"type":393,"tag":401,"props":6449,"children":6450},{},[6451],{"type":393,"tag":432,"props":6452,"children":6453},{},[6454],{"type":398,"value":6455},"Power Combinations:",{"type":393,"tag":438,"props":6457,"children":6458},{},[6459,6470,6483],{"type":393,"tag":442,"props":6460,"children":6461},{},[6462,6464],{"type":398,"value":6463},"Conditional rows + specific columns: ",{"type":393,"tag":405,"props":6465,"children":6467},{"className":6466},[],[6468],{"type":398,"value":6469},"df.loc[condition, ['col1', 'col2']]",{"type":393,"tag":442,"props":6471,"children":6472},{},[6473,6475,6481],{"type":398,"value":6474},"Position-based sampling: ",{"type":393,"tag":405,"props":6476,"children":6478},{"className":6477},[],[6479],{"type":398,"value":6480},"df.iloc[::10]",{"type":398,"value":6482}," (every 10th row)",{"type":393,"tag":442,"props":6484,"children":6485},{},[6486,6488,6494,6495],{"type":398,"value":6487},"First/last N rows: ",{"type":393,"tag":405,"props":6489,"children":6491},{"className":6490},[],[6492],{"type":398,"value":6493},"df.iloc[:5]",{"type":398,"value":470},{"type":393,"tag":405,"props":6496,"children":6498},{"className":6497},[],[6499],{"type":398,"value":6500},"df.iloc[-3:]",{"type":393,"tag":401,"props":6502,"children":6503},{},[6504,6508],{"type":393,"tag":432,"props":6505,"children":6506},{},[6507],{"type":398,"value":5589},{"type":398,"value":6509}," loc and iloc are your precision tools - use them when basic selection isn't enough!",{"type":393,"tag":550,"props":6511,"children":6513},{"id":6512},"practice-challenge",[6514],{"type":398,"value":6515},"🎮 Practice Challenge",{"type":393,"tag":401,"props":6517,"children":6518},{},[6519],{"type":398,"value":6520},"Test your loc/iloc skills:",{"type":393,"tag":567,"props":6522,"children":6523},{},[6524],{"type":393,"tag":571,"props":6525,"children":6527},{"className":573,"code":6526,"language":575,"meta":6,"style":6},"import pandas as pd\n\n# Customer data\ncustomers = pd.DataFrame({\n    'customer_id': [1001, 1002, 1003, 1004, 1005],\n    'name': ['Alice', 'Bob', 'Charlie', 'Diana', 'Eve'],\n    'age': [25, 35, 30, 28, 45],\n    'city': ['NYC', 'LA', 'Chicago', 'Boston', 'Miami'],\n    'total_orders': [5, 12, 8, 15, 3]\n})\n\nprint(\"Customer Dataset:\")\nprint(customers)\nprint()\n\nprint(\"🎮 Practice Challenges:\")\nprint()\n\nprint(\"1️⃣ Get Bob's age using loc:\")\nbob_age = customers.loc[customers['name'] == 'Bob', 'age'].iloc[0]\nprint(f\"Bob's age: {bob_age}\")\nprint()\n\nprint(\"2️⃣ Get last 2 customers using iloc:\")\nlast_two = customers.iloc[-2:]\nprint(\"Last 2 customers:\")\nprint(last_two[['name', 'city']])\nprint()\n\nprint(\"3️⃣ High-value customers (>10 orders) - names only:\")\nhigh_value = customers.loc[customers['total_orders'] > 10, 'name']\nprint(\"High-value customers:\", list(high_value))\n",[6528],{"type":393,"tag":405,"props":6529,"children":6530},{"__ignoreMap":6},[6531,6550,6557,6565,6581,6638,6689,6741,6794,6847,6854,6861,6881,6893,6904,6911,6931,6942,6949,6969,7024,7065,7076,7083,7103,7133,7153,7181,7192,7199,7219,7265],{"type":393,"tag":581,"props":6532,"children":6533},{"class":583,"line":11},[6534,6538,6542,6546],{"type":393,"tag":581,"props":6535,"children":6536},{"style":587},[6537],{"type":398,"value":590},{"type":393,"tag":581,"props":6539,"children":6540},{"style":593},[6541],{"type":398,"value":596},{"type":393,"tag":581,"props":6543,"children":6544},{"style":587},[6545],{"type":398,"value":601},{"type":393,"tag":581,"props":6547,"children":6548},{"style":593},[6549],{"type":398,"value":606},{"type":393,"tag":581,"props":6551,"children":6552},{"class":583,"line":27},[6553],{"type":393,"tag":581,"props":6554,"children":6555},{"emptyLinePlaceholder":12},[6556],{"type":398,"value":614},{"type":393,"tag":581,"props":6558,"children":6559},{"class":583,"line":36},[6560],{"type":393,"tag":581,"props":6561,"children":6562},{"style":620},[6563],{"type":398,"value":6564},"# Customer data\n",{"type":393,"tag":581,"props":6566,"children":6567},{"class":583,"line":45},[6568,6573,6577],{"type":393,"tag":581,"props":6569,"children":6570},{"style":593},[6571],{"type":398,"value":6572},"customers ",{"type":393,"tag":581,"props":6574,"children":6575},{"style":587},[6576],{"type":398,"value":636},{"type":393,"tag":581,"props":6578,"children":6579},{"style":593},[6580],{"type":398,"value":641},{"type":393,"tag":581,"props":6582,"children":6583},{"class":583,"line":54},[6584,6589,6593,6598,6602,6607,6611,6616,6620,6625,6629,6634],{"type":393,"tag":581,"props":6585,"children":6586},{"style":647},[6587],{"type":398,"value":6588},"    'customer_id'",{"type":393,"tag":581,"props":6590,"children":6591},{"style":593},[6592],{"type":398,"value":655},{"type":393,"tag":581,"props":6594,"children":6595},{"style":708},[6596],{"type":398,"value":6597},"1001",{"type":393,"tag":581,"props":6599,"children":6600},{"style":593},[6601],{"type":398,"value":665},{"type":393,"tag":581,"props":6603,"children":6604},{"style":708},[6605],{"type":398,"value":6606},"1002",{"type":393,"tag":581,"props":6608,"children":6609},{"style":593},[6610],{"type":398,"value":665},{"type":393,"tag":581,"props":6612,"children":6613},{"style":708},[6614],{"type":398,"value":6615},"1003",{"type":393,"tag":581,"props":6617,"children":6618},{"style":593},[6619],{"type":398,"value":665},{"type":393,"tag":581,"props":6621,"children":6622},{"style":708},[6623],{"type":398,"value":6624},"1004",{"type":393,"tag":581,"props":6626,"children":6627},{"style":593},[6628],{"type":398,"value":665},{"type":393,"tag":581,"props":6630,"children":6631},{"style":708},[6632],{"type":398,"value":6633},"1005",{"type":393,"tag":581,"props":6635,"children":6636},{"style":593},[6637],{"type":398,"value":693},{"type":393,"tag":581,"props":6639,"children":6640},{"class":583,"line":63},[6641,6645,6649,6653,6657,6661,6665,6669,6673,6677,6681,6685],{"type":393,"tag":581,"props":6642,"children":6643},{"style":647},[6644],{"type":398,"value":650},{"type":393,"tag":581,"props":6646,"children":6647},{"style":593},[6648],{"type":398,"value":655},{"type":393,"tag":581,"props":6650,"children":6651},{"style":647},[6652],{"type":398,"value":660},{"type":393,"tag":581,"props":6654,"children":6655},{"style":593},[6656],{"type":398,"value":665},{"type":393,"tag":581,"props":6658,"children":6659},{"style":647},[6660],{"type":398,"value":670},{"type":393,"tag":581,"props":6662,"children":6663},{"style":593},[6664],{"type":398,"value":665},{"type":393,"tag":581,"props":6666,"children":6667},{"style":647},[6668],{"type":398,"value":679},{"type":393,"tag":581,"props":6670,"children":6671},{"style":593},[6672],{"type":398,"value":665},{"type":393,"tag":581,"props":6674,"children":6675},{"style":647},[6676],{"type":398,"value":688},{"type":393,"tag":581,"props":6678,"children":6679},{"style":593},[6680],{"type":398,"value":665},{"type":393,"tag":581,"props":6682,"children":6683},{"style":647},[6684],{"type":398,"value":2724},{"type":393,"tag":581,"props":6686,"children":6687},{"style":593},[6688],{"type":398,"value":693},{"type":393,"tag":581,"props":6690,"children":6691},{"class":583,"line":72},[6692,6696,6700,6704,6708,6712,6716,6720,6724,6728,6732,6737],{"type":393,"tag":581,"props":6693,"children":6694},{"style":647},[6695],{"type":398,"value":2736},{"type":393,"tag":581,"props":6697,"children":6698},{"style":593},[6699],{"type":398,"value":655},{"type":393,"tag":581,"props":6701,"children":6702},{"style":708},[6703],{"type":398,"value":1410},{"type":393,"tag":581,"props":6705,"children":6706},{"style":593},[6707],{"type":398,"value":665},{"type":393,"tag":581,"props":6709,"children":6710},{"style":708},[6711],{"type":398,"value":2762},{"type":393,"tag":581,"props":6713,"children":6714},{"style":593},[6715],{"type":398,"value":665},{"type":393,"tag":581,"props":6717,"children":6718},{"style":708},[6719],{"type":398,"value":2753},{"type":393,"tag":581,"props":6721,"children":6722},{"style":593},[6723],{"type":398,"value":665},{"type":393,"tag":581,"props":6725,"children":6726},{"style":708},[6727],{"type":398,"value":2771},{"type":393,"tag":581,"props":6729,"children":6730},{"style":593},[6731],{"type":398,"value":665},{"type":393,"tag":581,"props":6733,"children":6734},{"style":708},[6735],{"type":398,"value":6736},"45",{"type":393,"tag":581,"props":6738,"children":6739},{"style":593},[6740],{"type":398,"value":693},{"type":393,"tag":581,"props":6742,"children":6743},{"class":583,"line":83},[6744,6748,6752,6756,6760,6764,6768,6772,6776,6781,6785,6790],{"type":393,"tag":581,"props":6745,"children":6746},{"style":647},[6747],{"type":398,"value":5729},{"type":393,"tag":581,"props":6749,"children":6750},{"style":593},[6751],{"type":398,"value":655},{"type":393,"tag":581,"props":6753,"children":6754},{"style":647},[6755],{"type":398,"value":5738},{"type":393,"tag":581,"props":6757,"children":6758},{"style":593},[6759],{"type":398,"value":665},{"type":393,"tag":581,"props":6761,"children":6762},{"style":647},[6763],{"type":398,"value":5747},{"type":393,"tag":581,"props":6765,"children":6766},{"style":593},[6767],{"type":398,"value":665},{"type":393,"tag":581,"props":6769,"children":6770},{"style":647},[6771],{"type":398,"value":5756},{"type":393,"tag":581,"props":6773,"children":6774},{"style":593},[6775],{"type":398,"value":665},{"type":393,"tag":581,"props":6777,"children":6778},{"style":647},[6779],{"type":398,"value":6780},"'Boston'",{"type":393,"tag":581,"props":6782,"children":6783},{"style":593},[6784],{"type":398,"value":665},{"type":393,"tag":581,"props":6786,"children":6787},{"style":647},[6788],{"type":398,"value":6789},"'Miami'",{"type":393,"tag":581,"props":6791,"children":6792},{"style":593},[6793],{"type":398,"value":693},{"type":393,"tag":581,"props":6795,"children":6796},{"class":583,"line":92},[6797,6802,6806,6810,6814,6819,6823,6827,6831,6835,6839,6843],{"type":393,"tag":581,"props":6798,"children":6799},{"style":647},[6800],{"type":398,"value":6801},"    'total_orders'",{"type":393,"tag":581,"props":6803,"children":6804},{"style":593},[6805],{"type":398,"value":655},{"type":393,"tag":581,"props":6807,"children":6808},{"style":708},[6809],{"type":398,"value":3483},{"type":393,"tag":581,"props":6811,"children":6812},{"style":593},[6813],{"type":398,"value":665},{"type":393,"tag":581,"props":6815,"children":6816},{"style":708},[6817],{"type":398,"value":6818},"12",{"type":393,"tag":581,"props":6820,"children":6821},{"style":593},[6822],{"type":398,"value":665},{"type":393,"tag":581,"props":6824,"children":6825},{"style":708},[6826],{"type":398,"value":1419},{"type":393,"tag":581,"props":6828,"children":6829},{"style":593},[6830],{"type":398,"value":665},{"type":393,"tag":581,"props":6832,"children":6833},{"style":708},[6834],{"type":398,"value":1392},{"type":393,"tag":581,"props":6836,"children":6837},{"style":593},[6838],{"type":398,"value":665},{"type":393,"tag":581,"props":6840,"children":6841},{"style":708},[6842],{"type":398,"value":1159},{"type":393,"tag":581,"props":6844,"children":6845},{"style":593},[6846],{"type":398,"value":834},{"type":393,"tag":581,"props":6848,"children":6849},{"class":583,"line":101},[6850],{"type":393,"tag":581,"props":6851,"children":6852},{"style":593},[6853],{"type":398,"value":842},{"type":393,"tag":581,"props":6855,"children":6856},{"class":583,"line":110},[6857],{"type":393,"tag":581,"props":6858,"children":6859},{"emptyLinePlaceholder":12},[6860],{"type":398,"value":614},{"type":393,"tag":581,"props":6862,"children":6863},{"class":583,"line":121},[6864,6868,6872,6877],{"type":393,"tag":581,"props":6865,"children":6866},{"style":708},[6867],{"type":398,"value":857},{"type":393,"tag":581,"props":6869,"children":6870},{"style":593},[6871],{"type":398,"value":862},{"type":393,"tag":581,"props":6873,"children":6874},{"style":647},[6875],{"type":398,"value":6876},"\"Customer Dataset:\"",{"type":393,"tag":581,"props":6878,"children":6879},{"style":593},[6880],{"type":398,"value":872},{"type":393,"tag":581,"props":6882,"children":6883},{"class":583,"line":130},[6884,6888],{"type":393,"tag":581,"props":6885,"children":6886},{"style":708},[6887],{"type":398,"value":857},{"type":393,"tag":581,"props":6889,"children":6890},{"style":593},[6891],{"type":398,"value":6892},"(customers)\n",{"type":393,"tag":581,"props":6894,"children":6895},{"class":583,"line":139},[6896,6900],{"type":393,"tag":581,"props":6897,"children":6898},{"style":708},[6899],{"type":398,"value":857},{"type":393,"tag":581,"props":6901,"children":6902},{"style":593},[6903],{"type":398,"value":896},{"type":393,"tag":581,"props":6905,"children":6906},{"class":583,"line":148},[6907],{"type":393,"tag":581,"props":6908,"children":6909},{"emptyLinePlaceholder":12},[6910],{"type":398,"value":614},{"type":393,"tag":581,"props":6912,"children":6913},{"class":583,"line":159},[6914,6918,6922,6927],{"type":393,"tag":581,"props":6915,"children":6916},{"style":708},[6917],{"type":398,"value":857},{"type":393,"tag":581,"props":6919,"children":6920},{"style":593},[6921],{"type":398,"value":862},{"type":393,"tag":581,"props":6923,"children":6924},{"style":647},[6925],{"type":398,"value":6926},"\"🎮 Practice Challenges:\"",{"type":393,"tag":581,"props":6928,"children":6929},{"style":593},[6930],{"type":398,"value":872},{"type":393,"tag":581,"props":6932,"children":6933},{"class":583,"line":168},[6934,6938],{"type":393,"tag":581,"props":6935,"children":6936},{"style":708},[6937],{"type":398,"value":857},{"type":393,"tag":581,"props":6939,"children":6940},{"style":593},[6941],{"type":398,"value":896},{"type":393,"tag":581,"props":6943,"children":6944},{"class":583,"line":177},[6945],{"type":393,"tag":581,"props":6946,"children":6947},{"emptyLinePlaceholder":12},[6948],{"type":398,"value":614},{"type":393,"tag":581,"props":6950,"children":6951},{"class":583,"line":186},[6952,6956,6960,6965],{"type":393,"tag":581,"props":6953,"children":6954},{"style":708},[6955],{"type":398,"value":857},{"type":393,"tag":581,"props":6957,"children":6958},{"style":593},[6959],{"type":398,"value":862},{"type":393,"tag":581,"props":6961,"children":6962},{"style":647},[6963],{"type":398,"value":6964},"\"1️⃣ Get Bob's age using loc:\"",{"type":393,"tag":581,"props":6966,"children":6967},{"style":593},[6968],{"type":398,"value":872},{"type":393,"tag":581,"props":6970,"children":6971},{"class":583,"line":197},[6972,6977,6981,6986,6990,6994,6998,7003,7007,7011,7016,7020],{"type":393,"tag":581,"props":6973,"children":6974},{"style":593},[6975],{"type":398,"value":6976},"bob_age ",{"type":393,"tag":581,"props":6978,"children":6979},{"style":587},[6980],{"type":398,"value":636},{"type":393,"tag":581,"props":6982,"children":6983},{"style":593},[6984],{"type":398,"value":6985}," customers.loc[customers[",{"type":393,"tag":581,"props":6987,"children":6988},{"style":647},[6989],{"type":398,"value":4707},{"type":393,"tag":581,"props":6991,"children":6992},{"style":593},[6993],{"type":398,"value":4688},{"type":393,"tag":581,"props":6995,"children":6996},{"style":587},[6997],{"type":398,"value":4800},{"type":393,"tag":581,"props":6999,"children":7000},{"style":647},[7001],{"type":398,"value":7002}," 'Bob'",{"type":393,"tag":581,"props":7004,"children":7005},{"style":593},[7006],{"type":398,"value":665},{"type":393,"tag":581,"props":7008,"children":7009},{"style":647},[7010],{"type":398,"value":3179},{"type":393,"tag":581,"props":7012,"children":7013},{"style":593},[7014],{"type":398,"value":7015},"].iloc[",{"type":393,"tag":581,"props":7017,"children":7018},{"style":708},[7019],{"type":398,"value":986},{"type":393,"tag":581,"props":7021,"children":7022},{"style":593},[7023],{"type":398,"value":834},{"type":393,"tag":581,"props":7025,"children":7026},{"class":583,"line":206},[7027,7031,7035,7039,7044,7048,7053,7057,7061],{"type":393,"tag":581,"props":7028,"children":7029},{"style":708},[7030],{"type":398,"value":857},{"type":393,"tag":581,"props":7032,"children":7033},{"style":593},[7034],{"type":398,"value":862},{"type":393,"tag":581,"props":7036,"children":7037},{"style":587},[7038],{"type":398,"value":3791},{"type":393,"tag":581,"props":7040,"children":7041},{"style":647},[7042],{"type":398,"value":7043},"\"Bob's age: ",{"type":393,"tag":581,"props":7045,"children":7046},{"style":708},[7047],{"type":398,"value":3801},{"type":393,"tag":581,"props":7049,"children":7050},{"style":593},[7051],{"type":398,"value":7052},"bob_age",{"type":393,"tag":581,"props":7054,"children":7055},{"style":708},[7056],{"type":398,"value":3821},{"type":393,"tag":581,"props":7058,"children":7059},{"style":647},[7060],{"type":398,"value":3852},{"type":393,"tag":581,"props":7062,"children":7063},{"style":593},[7064],{"type":398,"value":872},{"type":393,"tag":581,"props":7066,"children":7067},{"class":583,"line":215},[7068,7072],{"type":393,"tag":581,"props":7069,"children":7070},{"style":708},[7071],{"type":398,"value":857},{"type":393,"tag":581,"props":7073,"children":7074},{"style":593},[7075],{"type":398,"value":896},{"type":393,"tag":581,"props":7077,"children":7078},{"class":583,"line":224},[7079],{"type":393,"tag":581,"props":7080,"children":7081},{"emptyLinePlaceholder":12},[7082],{"type":398,"value":614},{"type":393,"tag":581,"props":7084,"children":7085},{"class":583,"line":233},[7086,7090,7094,7099],{"type":393,"tag":581,"props":7087,"children":7088},{"style":708},[7089],{"type":398,"value":857},{"type":393,"tag":581,"props":7091,"children":7092},{"style":593},[7093],{"type":398,"value":862},{"type":393,"tag":581,"props":7095,"children":7096},{"style":647},[7097],{"type":398,"value":7098},"\"2️⃣ Get last 2 customers using iloc:\"",{"type":393,"tag":581,"props":7100,"children":7101},{"style":593},[7102],{"type":398,"value":872},{"type":393,"tag":581,"props":7104,"children":7105},{"class":583,"line":244},[7106,7111,7115,7120,7124,7128],{"type":393,"tag":581,"props":7107,"children":7108},{"style":593},[7109],{"type":398,"value":7110},"last_two ",{"type":393,"tag":581,"props":7112,"children":7113},{"style":587},[7114],{"type":398,"value":636},{"type":393,"tag":581,"props":7116,"children":7117},{"style":593},[7118],{"type":398,"value":7119}," customers.iloc[",{"type":393,"tag":581,"props":7121,"children":7122},{"style":587},[7123],{"type":398,"value":2328},{"type":393,"tag":581,"props":7125,"children":7126},{"style":708},[7127],{"type":398,"value":1142},{"type":393,"tag":581,"props":7129,"children":7130},{"style":593},[7131],{"type":398,"value":7132},":]\n",{"type":393,"tag":581,"props":7134,"children":7135},{"class":583,"line":253},[7136,7140,7144,7149],{"type":393,"tag":581,"props":7137,"children":7138},{"style":708},[7139],{"type":398,"value":857},{"type":393,"tag":581,"props":7141,"children":7142},{"style":593},[7143],{"type":398,"value":862},{"type":393,"tag":581,"props":7145,"children":7146},{"style":647},[7147],{"type":398,"value":7148},"\"Last 2 customers:\"",{"type":393,"tag":581,"props":7150,"children":7151},{"style":593},[7152],{"type":398,"value":872},{"type":393,"tag":581,"props":7154,"children":7155},{"class":583,"line":262},[7156,7160,7165,7169,7173,7177],{"type":393,"tag":581,"props":7157,"children":7158},{"style":708},[7159],{"type":398,"value":857},{"type":393,"tag":581,"props":7161,"children":7162},{"style":593},[7163],{"type":398,"value":7164},"(last_two[[",{"type":393,"tag":581,"props":7166,"children":7167},{"style":647},[7168],{"type":398,"value":4707},{"type":393,"tag":581,"props":7170,"children":7171},{"style":593},[7172],{"type":398,"value":665},{"type":393,"tag":581,"props":7174,"children":7175},{"style":647},[7176],{"type":398,"value":6112},{"type":393,"tag":581,"props":7178,"children":7179},{"style":593},[7180],{"type":398,"value":1831},{"type":393,"tag":581,"props":7182,"children":7183},{"class":583,"line":271},[7184,7188],{"type":393,"tag":581,"props":7185,"children":7186},{"style":708},[7187],{"type":398,"value":857},{"type":393,"tag":581,"props":7189,"children":7190},{"style":593},[7191],{"type":398,"value":896},{"type":393,"tag":581,"props":7193,"children":7194},{"class":583,"line":281},[7195],{"type":393,"tag":581,"props":7196,"children":7197},{"emptyLinePlaceholder":12},[7198],{"type":398,"value":614},{"type":393,"tag":581,"props":7200,"children":7201},{"class":583,"line":290},[7202,7206,7210,7215],{"type":393,"tag":581,"props":7203,"children":7204},{"style":708},[7205],{"type":398,"value":857},{"type":393,"tag":581,"props":7207,"children":7208},{"style":593},[7209],{"type":398,"value":862},{"type":393,"tag":581,"props":7211,"children":7212},{"style":647},[7213],{"type":398,"value":7214},"\"3️⃣ High-value customers (>10 orders) - names only:\"",{"type":393,"tag":581,"props":7216,"children":7217},{"style":593},[7218],{"type":398,"value":872},{"type":393,"tag":581,"props":7220,"children":7221},{"class":583,"line":299},[7222,7227,7231,7235,7240,7244,7248,7253,7257,7261],{"type":393,"tag":581,"props":7223,"children":7224},{"style":593},[7225],{"type":398,"value":7226},"high_value ",{"type":393,"tag":581,"props":7228,"children":7229},{"style":587},[7230],{"type":398,"value":636},{"type":393,"tag":581,"props":7232,"children":7233},{"style":593},[7234],{"type":398,"value":6985},{"type":393,"tag":581,"props":7236,"children":7237},{"style":647},[7238],{"type":398,"value":7239},"'total_orders'",{"type":393,"tag":581,"props":7241,"children":7242},{"style":593},[7243],{"type":398,"value":4688},{"type":393,"tag":581,"props":7245,"children":7246},{"style":587},[7247],{"type":398,"value":4693},{"type":393,"tag":581,"props":7249,"children":7250},{"style":708},[7251],{"type":398,"value":7252}," 10",{"type":393,"tag":581,"props":7254,"children":7255},{"style":593},[7256],{"type":398,"value":665},{"type":393,"tag":581,"props":7258,"children":7259},{"style":647},[7260],{"type":398,"value":4707},{"type":393,"tag":581,"props":7262,"children":7263},{"style":593},[7264],{"type":398,"value":834},{"type":393,"tag":581,"props":7266,"children":7267},{"class":583,"line":308},[7268,7272,7276,7281,7285,7289],{"type":393,"tag":581,"props":7269,"children":7270},{"style":708},[7271],{"type":398,"value":857},{"type":393,"tag":581,"props":7273,"children":7274},{"style":593},[7275],{"type":398,"value":862},{"type":393,"tag":581,"props":7277,"children":7278},{"style":647},[7279],{"type":398,"value":7280},"\"High-value customers:\"",{"type":393,"tag":581,"props":7282,"children":7283},{"style":593},[7284],{"type":398,"value":665},{"type":393,"tag":581,"props":7286,"children":7287},{"style":708},[7288],{"type":398,"value":4727},{"type":393,"tag":581,"props":7290,"children":7291},{"style":593},[7292],{"type":398,"value":7293},"(high_value))\n",{"type":393,"tag":550,"props":7295,"children":7297},{"id":7296},"whats-next",[7298],{"type":398,"value":7299},"🚀 What's Next?",{"type":393,"tag":401,"props":7301,"children":7302},{},[7303],{"type":398,"value":7304},"Excellent! You now have precise control over data selection. Next, let's learn about filtering data using conditions and boolean logic.",{"type":393,"tag":401,"props":7306,"children":7307},{},[7308,7313,7314],{"type":393,"tag":432,"props":7309,"children":7310},{},[7311],{"type":398,"value":7312},"Continue to",{"type":398,"value":3826},{"type":393,"tag":7315,"props":7316,"children":7317},"a",{"href":173},[7318],{"type":398,"value":174},{"type":393,"tag":401,"props":7320,"children":7321},{},[7322],{"type":398,"value":7323},"You're becoming a data selection expert! 🔍🎯",{"type":393,"tag":7325,"props":7326,"children":7327},"style",{},[7328],{"type":398,"value":7329},"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":7331},[7332,7333,7334,7335,7336,7337,7338,7339,7340,7341,7342],{"id":552,"depth":27,"text":555},{"id":1254,"depth":27,"text":1257},{"id":1909,"depth":27,"text":1912},{"id":2608,"depth":27,"text":2611},{"id":3278,"depth":27,"text":3281},{"id":4258,"depth":27,"text":4261},{"id":5109,"depth":27,"text":5112},{"id":5350,"depth":27,"text":5353},{"id":6274,"depth":27,"text":6277},{"id":6512,"depth":27,"text":6515},{"id":7296,"depth":27,"text":7299},1782373722540]