[{"data":1,"prerenderedAt":1514},["ShallowReactive",2],{"doc:\u002Fgetting-started-with-python-excel-automation\u002Fusing-python-in-excel\u002Fclean-data-with-pandas-in-python-in-excel":3,"surround:\u002Fgetting-started-with-python-excel-automation\u002Fusing-python-in-excel\u002Fclean-data-with-pandas-in-python-in-excel":1486,"ancestors:\u002Fgetting-started-with-python-excel-automation\u002Fusing-python-in-excel\u002Fclean-data-with-pandas-in-python-in-excel":1493,"children:\u002Fgetting-started-with-python-excel-automation\u002Fusing-python-in-excel\u002Fclean-data-with-pandas-in-python-in-excel":1497,"related:\u002Fgetting-started-with-python-excel-automation\u002Fusing-python-in-excel\u002Fclean-data-with-pandas-in-python-in-excel":1498},{"id":4,"title":5,"body":6,"dateModified":1451,"datePublished":1451,"description":1452,"extension":1453,"faq":1454,"keyword":1463,"kind":1464,"meta":1465,"navigation":985,"path":1474,"seo":1475,"slug":1478,"stem":1479,"topics":1480,"type":1484,"__hash__":1485},"docs\u002Fgetting-started-with-python-excel-automation\u002Fusing-python-in-excel\u002Fclean-data-with-pandas-in-python-in-excel\u002Findex.md","Clean Data with pandas in Python in Excel",{"type":7,"value":8,"toc":1437},"minimark",[9,28,207,212,219,303,306,310,327,377,392,396,399,518,529,533,538,650,664,870,874,877,1046,1065,1069,1080,1089,1100,1129,1132,1192,1196,1288,1298,1302,1344,1348,1358,1362,1368,1372,1378,1384,1390,1400,1404,1433],[10,11,12,13,17,18,21,22,27],"p",{},"Python in Excel runs pandas right inside a workbook: type ",[14,15,16],"code",{},"=PY("," into a cell, reference a range with ",[14,19,20],{},"xl()",", and the Python code runs in Microsoft's cloud and returns its result to the grid. For data cleaning that is a genuinely useful combination. The messy table stays where the people who maintain it can see it, the cleaning steps are written once as code instead of repeated by hand, and the cleaned result updates whenever the source changes. This guide, part of ",[23,24,26],"a",{"href":25},"\u002Fgetting-started-with-python-excel-automation\u002Fusing-python-in-excel\u002F","Using Python in Excel",", cleans a typical hand-maintained table step by step and explains the rules that make multi-cell Python work predictable.",[29,30,38,39,38,43,38,47,38,55,38,65,38,76,38,83,38,88,38,96,38,101,38,108,38,113,38,117,38,124,38,129,38,132,38,136,38,139,38,143,38,146,38,149,38,155,38,159,38,162,38,165,38,168,38,172,38,175,38,180,38,187,38,192,38,195,38,199,38,201],"svg",{"viewBox":31,"role":32,"ariaLabelledBy":33,"xmlns":36,"style":37},"4 0 752 159","img",[34,35],"pyx-clean-flow-t","pyx-clean-flow-d","http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg","width:100%;max-width:752px;height:auto;display:block;margin:1.5rem auto;font-family:Inter,ui-sans-serif,system-ui,sans-serif","\n  ",[40,41,42],"title",{"id":34},"Cleaning a table with Python in Excel",[44,45,46],"desc",{"id":35},"A raw table on the sheet is read into a DataFrame by xl() in a PY cell. Further PY cells fix text, types, duplicates and categories, each using the DataFrame from the cell before. The final PY cell returns Excel values, which spill as a clean table beside the original.",[48,49],"rect",{"x":50,"y":51,"width":52,"height":53,"fill":54},"4","0","752","159","#ffffff",[48,56],{"x":57,"y":58,"width":59,"height":60,"rx":61,"fill":62,"stroke":63,"style":64},"20.0","16.0","153.0","101.0","12","#e7ebef","var(--line,#cdd5e6)","stroke-width:2px",[66,67,69],"g",{"transform":68},"translate(84.5,33.0) scale(1.000)",[70,71],"path",{"d":72,"fill":73,"stroke":74,"style":75},"M4 4h16v16H4z M4 9h16 M4 14h16 M10 4v16","none","var(--text,#172033)","stroke-width:1.80px;stroke-linecap:round;stroke-linejoin:round",[77,78,82],"text",{"x":79,"y":80,"style":81},"96.5","79.5","font-size:13.5px;font-weight:700;fill:var(--text,#172033);text-anchor:middle","Raw table",[77,84,87],{"x":79,"y":85,"style":86},"99.0","font-size:11.5px;font-weight:400;fill:var(--text,#172033);text-anchor:middle","typed by people",[89,90],"circle",{"cx":91,"cy":92,"r":93,"fill":94,"stroke":73,"style":95},"36.0","32.0","11.0","#5b6780","stroke-width:0px",[77,97,100],{"x":91,"y":98,"style":99},"36.5","font-size:12px;font-weight:700;fill:#ffffff;text-anchor:middle","1",[102,103],"line",{"x1":104,"y1":105,"x2":106,"y2":105,"stroke":107,"style":64},"178.0","66.5","200.0","var(--brand,#5b5cf0)",[109,110],"polygon",{"points":111,"fill":112},"204.0,66.5 195.0,71.5 195.0,61.5","#5b5cf0",[48,114],{"x":115,"y":58,"width":59,"height":60,"rx":61,"fill":116,"stroke":107,"style":64},"209.0","#f0f4ff",[66,118,120],{"transform":119},"translate(273.5,33.0) scale(1.000)",[70,121],{"d":122,"fill":73,"stroke":123,"style":75},"M12 3c-4 0-4 1.6-4 3v2h4.2v1H6c-2 0-3 1.4-3 4s1 4 3 4h2v-2.6c0-1.6 1.3-2.9 2.9-2.9h4.2c1.3 0 2.4-1.1 2.4-2.4V6c0-1.6-1.8-3-5.5-3z M10 5.5h.01 M12 21c4 0 4-1.6 4-3v-2h-4.2v-1H18c2 0 3-1.4 3-4s-1-4-3-4h-2v2.6c0 1.6-1.3 2.9-2.9 2.9H8.9c-1.3 0-2.4 1.1-2.4 2.4V18c0 1.6 1.8 3 5.5 3z M14 18.5h.01","var(--brand-strong,#4338ca)",[77,125,128],{"x":126,"y":80,"style":127},"285.5","font-size:13.5px;font-weight:700;fill:var(--brand-strong,#4338ca);text-anchor:middle","xl() read",[77,130,131],{"x":126,"y":85,"style":86},"DataFrame in a PY cell",[89,133],{"cx":134,"cy":92,"r":93,"fill":135,"stroke":73,"style":95},"225.0","#4338ca",[77,137,138],{"x":134,"y":98,"style":99},"2",[102,140],{"x1":141,"y1":105,"x2":142,"y2":105,"stroke":107,"style":64},"367.0","389.0",[109,144],{"points":145,"fill":112},"393.0,66.5 384.0,71.5 384.0,61.5",[48,147],{"x":148,"y":58,"width":59,"height":60,"rx":61,"fill":116,"stroke":107,"style":64},"398.0",[66,150,152],{"transform":151},"translate(462.5,33.0) scale(1.000)",[70,153],{"d":154,"fill":73,"stroke":123,"style":75},"M9 8l-4 4 4 4 M15 8l4 4-4 4",[77,156,158],{"x":157,"y":80,"style":127},"474.5","Clean steps",[77,160,161],{"x":157,"y":85,"style":86},"one PY cell each",[89,163],{"cx":164,"cy":92,"r":93,"fill":135,"stroke":73,"style":95},"414.0",[77,166,167],{"x":164,"y":98,"style":99},"3",[102,169],{"x1":170,"y1":105,"x2":171,"y2":105,"stroke":107,"style":64},"556.0","578.0",[109,173],{"points":174,"fill":112},"582.0,66.5 573.0,71.5 573.0,61.5",[48,176],{"x":177,"y":58,"width":59,"height":60,"rx":61,"fill":178,"stroke":179,"style":64},"587.0","#d9f4f1","var(--teal,#0f9488)",[66,181,183],{"transform":182},"translate(651.5,33.0) scale(1.000)",[70,184],{"d":185,"fill":73,"stroke":186,"style":75},"M3 5h18v14H3z M3 10h18 M3 15h18 M9 5v14","var(--teal-ink,#0b6157)",[77,188,191],{"x":189,"y":80,"style":190},"663.5","font-size:13.5px;font-weight:700;fill:var(--teal-ink,#0b6157);text-anchor:middle","Excel values",[77,193,194],{"x":189,"y":85,"style":86},"spill as a table",[89,196],{"cx":197,"cy":92,"r":93,"fill":198,"stroke":73,"style":95},"603.0","#0b6157",[77,200,50],{"x":197,"y":98,"style":99},[77,202,206],{"x":203,"y":204,"style":205},"380.0","139.0","font-size:12.5px;font-weight:400;fill:var(--muted,#5b6780);text-anchor:middle","the source cells are never modified — the cleaned table is recalculated from them",[208,209,211],"h2",{"id":210},"prerequisites","Prerequisites",[10,213,214,215,218],{},"Python in Excel is available in Microsoft 365 on Windows, Mac and the web for supported plans. There is nothing to install: the Python runtime and libraries such as pandas and NumPy are provided by Microsoft in the cloud. The examples assume a sheet with a table named ",[14,216,217],{},"Contacts"," like this one — the kind of list that several people type into over months:",[220,221,222,241],"table",{},[223,224,225],"thead",{},[226,227,228,232,235,238],"tr",{},[229,230,231],"th",{},"Name",[229,233,234],{},"Region",[229,236,237],{},"Signed up",[229,239,240],{},"Spend",[242,243,244,261,275,289],"tbody",{},[226,245,246,252,255,258],{},[247,248,249],"td",{},[14,250,251],{},"  Ana Silva",[247,253,254],{},"north",[247,256,257],{},"2026-01-05",[247,259,260],{},"1,200",[226,262,263,266,269,272],{},[247,264,265],{},"Ben Okafor",[247,267,268],{},"North",[247,270,271],{},"05\u002F01\u002F2026",[247,273,274],{},"950",[226,276,277,282,285,287],{},[247,278,279],{},[14,280,281],{},"ana silva ",[247,283,284],{},"NORTH",[247,286,257],{},[247,288,260],{},[226,290,291,294,297,300],{},[247,292,293],{},"Cy Tan",[247,295,296],{},"Sth",[247,298,299],{},"2026-02-11",[247,301,302],{},"n\u002Fa",[10,304,305],{},"Whitespace, inconsistent case, a duplicate that differs only in spacing, two date formats, text in a numeric column, and an abbreviation — each of them breaks a pivot or a lookup.",[208,307,309],{"id":308},"step-1-read-the-table-into-a-dataframe","Step 1 — Read the table into a DataFrame",[10,311,312,313,315,316,318,319,322,323,326],{},"In an empty cell, type ",[14,314,16],{}," to enter Python mode, then reference the table with ",[14,317,20],{},". Referencing the whole table with ",[14,320,321],{},"[#All]"," and ",[14,324,325],{},"headers=True"," gives you proper column names:",[328,329,334],"pre",{"className":330,"code":331,"language":332,"meta":333,"style":333},"language-python shiki shiki-themes github-light github-dark-high-contrast","raw = xl(\"Contacts[#All]\", headers=True)\nraw.shape\n","python","",[14,335,336,371],{"__ignoreMap":333},[337,338,340,344,348,351,355,358,362,364,368],"span",{"class":102,"line":339},1,[337,341,343],{"class":342},"skGVy","raw ",[337,345,347],{"class":346},"s-kum","=",[337,349,350],{"class":342}," xl(",[337,352,354],{"class":353},"srMev","\"Contacts[#All]\"",[337,356,357],{"class":342},", ",[337,359,361],{"class":360},"sa561","headers",[337,363,347],{"class":346},[337,365,367],{"class":366},"sP0c6","True",[337,369,370],{"class":342},")\n",[337,372,374],{"class":102,"line":373},2,[337,375,376],{"class":342},"raw.shape\n",[10,378,379,380,383,384,386,387,391],{},"Commit with Ctrl+Enter. The cell shows a DataFrame card; hovering or clicking it previews the data. Keep this first cell as a plain read — it makes the later cells easier to debug, because you can always inspect ",[14,381,382],{},"raw"," exactly as it arrived. How ",[14,385,20],{}," addresses ranges, tables and named ranges is covered in ",[23,388,390],{"href":389},"\u002Fgetting-started-with-python-excel-automation\u002Fusing-python-in-excel\u002Freference-cells-ranges-and-tables-with-xl-in-python-in-excel\u002F","Reference Cells, Ranges and Tables with xl() in Python in Excel",".",[208,393,395],{"id":394},"step-2-clean-text-columns","Step 2 — Clean text columns",[10,397,398],{},"In the next cell — to the right of or below the first, because of the calculation order described below — normalise the text: strip surrounding spaces, collapse repeated spaces inside names, and put names and regions into a consistent case:",[328,400,402],{"className":330,"code":401,"language":332,"meta":333,"style":333},"df = raw.copy()\ndf[\"Name\"] = (df[\"Name\"].astype(str)\n                         .str.strip()\n                         .str.replace(r\"\\s+\", \" \", regex=True)\n                         .str.title())\ndf[\"Region\"] = df[\"Region\"].astype(str).str.strip().str.title()\ndf.head()\n",[14,403,404,414,440,446,482,488,512],{"__ignoreMap":333},[337,405,406,409,411],{"class":102,"line":339},[337,407,408],{"class":342},"df ",[337,410,347],{"class":346},[337,412,413],{"class":342}," raw.copy()\n",[337,415,416,419,422,425,427,430,432,435,438],{"class":102,"line":373},[337,417,418],{"class":342},"df[",[337,420,421],{"class":353},"\"Name\"",[337,423,424],{"class":342},"] ",[337,426,347],{"class":346},[337,428,429],{"class":342}," (df[",[337,431,421],{"class":353},[337,433,434],{"class":342},"].astype(",[337,436,437],{"class":366},"str",[337,439,370],{"class":342},[337,441,443],{"class":102,"line":442},3,[337,444,445],{"class":342},"                         .str.strip()\n",[337,447,449,452,455,458,461,464,466,468,471,473,476,478,480],{"class":102,"line":448},4,[337,450,451],{"class":342},"                         .str.replace(",[337,453,454],{"class":346},"r",[337,456,457],{"class":353},"\"",[337,459,460],{"class":366},"\\s",[337,462,463],{"class":346},"+",[337,465,457],{"class":353},[337,467,357],{"class":342},[337,469,470],{"class":353},"\" \"",[337,472,357],{"class":342},[337,474,475],{"class":360},"regex",[337,477,347],{"class":346},[337,479,367],{"class":366},[337,481,370],{"class":342},[337,483,485],{"class":102,"line":484},5,[337,486,487],{"class":342},"                         .str.title())\n",[337,489,491,493,496,498,500,503,505,507,509],{"class":102,"line":490},6,[337,492,418],{"class":342},[337,494,495],{"class":353},"\"Region\"",[337,497,424],{"class":342},[337,499,347],{"class":346},[337,501,502],{"class":342}," df[",[337,504,495],{"class":353},[337,506,434],{"class":342},[337,508,437],{"class":366},[337,510,511],{"class":342},").str.strip().str.title()\n",[337,513,515],{"class":102,"line":514},7,[337,516,517],{"class":342},"df.head()\n",[10,519,520,521,523,524,528],{},"Working on a copy keeps ",[14,522,382],{}," intact for comparison. The same operations outside Excel are described in ",[23,525,527],{"href":526},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Fstrip-whitespace-and-normalise-text-columns-with-pandas\u002F","Strip Whitespace and Normalise Text Columns with pandas","; inside Excel they are identical, which is much of the appeal — a cleaning routine prototyped in a PY cell can move into a scheduled script later with little change.",[208,530,532],{"id":531},"step-3-fix-types-dates-and-numbers","Step 3 — Fix types: dates and numbers",[10,534,535,537],{},[14,536,20],{}," passes values as Excel holds them. Real date cells arrive as datetimes, but dates typed as text arrive as strings, and numbers typed with thousands separators or placeholders arrive as text. Convert explicitly, treating anything unparseable as missing so it can be reported rather than guessed:",[328,539,541],{"className":330,"code":540,"language":332,"meta":333,"style":333},"df[\"Signed up\"] = pd.to_datetime(df[\"Signed up\"], dayfirst=True, errors=\"coerce\")\ndf[\"Spend\"] = pd.to_numeric(\n    df[\"Spend\"].astype(str).str.replace(\",\", \"\", regex=False).str.strip(),\n    errors=\"coerce\",\n)\ndf.dtypes\n",[14,542,543,581,595,629,641,645],{"__ignoreMap":333},[337,544,545,547,550,552,554,557,559,562,565,567,569,571,574,576,579],{"class":102,"line":339},[337,546,418],{"class":342},[337,548,549],{"class":353},"\"Signed up\"",[337,551,424],{"class":342},[337,553,347],{"class":346},[337,555,556],{"class":342}," pd.to_datetime(df[",[337,558,549],{"class":353},[337,560,561],{"class":342},"], ",[337,563,564],{"class":360},"dayfirst",[337,566,347],{"class":346},[337,568,367],{"class":366},[337,570,357],{"class":342},[337,572,573],{"class":360},"errors",[337,575,347],{"class":346},[337,577,578],{"class":353},"\"coerce\"",[337,580,370],{"class":342},[337,582,583,585,588,590,592],{"class":102,"line":373},[337,584,418],{"class":342},[337,586,587],{"class":353},"\"Spend\"",[337,589,424],{"class":342},[337,591,347],{"class":346},[337,593,594],{"class":342}," pd.to_numeric(\n",[337,596,597,600,602,604,606,609,612,614,617,619,621,623,626],{"class":102,"line":442},[337,598,599],{"class":342},"    df[",[337,601,587],{"class":353},[337,603,434],{"class":342},[337,605,437],{"class":366},[337,607,608],{"class":342},").str.replace(",[337,610,611],{"class":353},"\",\"",[337,613,357],{"class":342},[337,615,616],{"class":353},"\"\"",[337,618,357],{"class":342},[337,620,475],{"class":360},[337,622,347],{"class":346},[337,624,625],{"class":366},"False",[337,627,628],{"class":342},").str.strip(),\n",[337,630,631,634,636,638],{"class":102,"line":448},[337,632,633],{"class":360},"    errors",[337,635,347],{"class":346},[337,637,578],{"class":353},[337,639,640],{"class":342},",\n",[337,642,643],{"class":102,"line":484},[337,644,370],{"class":342},[337,646,647],{"class":102,"line":490},[337,648,649],{"class":342},"df.dtypes\n",[10,651,652,655,656,658,659,663],{},[14,653,654],{},"dayfirst=True"," records a decision: in this workbook ",[14,657,271],{}," means 5 January. Make that decision deliberately for your data — it is the single most common silent error in spreadsheet cleaning — and see ",[23,660,662],{"href":661},"\u002Fadvanced-data-transformation-and-cleaning\u002Fworking-with-dates-and-times-in-excel-data\u002Fparse-excel-dates-into-python-datetimes-with-pandas\u002F","Parse Excel Dates into Python datetimes with pandas"," for mixed-format columns.",[29,665,38,671,38,674,38,677,38,682,38,688,38,692,38,698,38,702,38,706,38,710,38,714,38,716,38,719,38,721,38,723,38,726,38,729,38,731,38,734,38,739,38,742,38,745,38,747,38,749,38,751,38,753,38,755,38,758,38,761,38,763,38,765,38,767,38,769,38,772,38,775,38,778,38,782,38,785,38,787,38,790,38,792,38,794,38,796,38,798,38,800,38,802,38,804,38,807,38,809,38,812,38,814,38,816,38,818,38,820,38,822,38,825,38,827,38,829,38,831,38,833,38,835,38,838,38,844,38,848,38,853,38,856,38,864],{"viewBox":666,"role":32,"ariaLabelledBy":667,"xmlns":36,"style":670},"26 0 707 192",[668,669],"pyx-types-t","pyx-types-d","width:100%;max-width:707px;height:auto;display:block;margin:1.5rem auto;font-family:Inter,ui-sans-serif,system-ui,sans-serif",[40,672,673],{"id":668},"Text-typed dates and amounts converted to real types",[44,675,676],{"id":669},"Before, the Signed up column mixes ISO dates and day-first text and the Spend column holds text with commas and an n\u002Fa placeholder. After conversion, all dates are datetime values and spend is numeric, with the placeholder turned into a missing value.",[48,678],{"x":679,"y":51,"width":680,"height":681,"fill":54},"26","707","192",[48,683],{"x":684,"y":685,"width":92,"height":686,"rx":51,"fill":62,"stroke":63,"style":687},"42.6","40.0","24.0","stroke-width:1px",[48,689],{"x":690,"y":685,"width":691,"height":686,"rx":51,"fill":62,"stroke":63,"style":687},"74.6","98.6",[77,693,697],{"x":694,"y":695,"style":696},"123.9","57.0","font-size:11px;font-weight:600;fill:var(--muted,#5b6780);text-anchor:middle","A",[48,699],{"x":700,"y":685,"width":701,"height":686,"rx":51,"fill":62,"stroke":63,"style":687},"173.2","63.5",[77,703,705],{"x":704,"y":695,"style":696},"204.9","B",[48,707],{"x":684,"y":708,"width":92,"height":709,"rx":51,"fill":62,"stroke":63,"style":687},"64.0","28.0",[77,711,100],{"x":712,"y":713,"style":696},"58.6","83.0",[48,715],{"x":690,"y":708,"width":691,"height":709,"rx":51,"fill":54,"stroke":63,"style":687},[77,717,237],{"x":694,"y":713,"style":718},"font-size:12px;font-weight:700;fill:var(--text,#172033);text-anchor:middle",[48,720],{"x":700,"y":708,"width":701,"height":709,"rx":51,"fill":54,"stroke":63,"style":687},[77,722,240],{"x":704,"y":713,"style":718},[48,724],{"x":684,"y":725,"width":92,"height":709,"rx":51,"fill":62,"stroke":63,"style":687},"92.0",[77,727,138],{"x":712,"y":728,"style":696},"111.0",[48,730],{"x":690,"y":725,"width":691,"height":709,"rx":51,"fill":54,"stroke":63,"style":687},[77,732,257],{"x":694,"y":728,"style":733},"font-size:12px;font-weight:400;fill:var(--text,#172033);text-anchor:middle",[48,735],{"x":700,"y":725,"width":701,"height":709,"rx":51,"fill":736,"stroke":737,"style":738},"#fee8f2","var(--accent,#f43f8f)","stroke-width:1.5px",[77,740,260],{"x":704,"y":728,"style":741},"font-size:12px;font-weight:700;fill:var(--accent-ink,#be185d);text-anchor:middle",[48,743],{"x":684,"y":744,"width":92,"height":709,"rx":51,"fill":62,"stroke":63,"style":687},"120.0",[77,746,167],{"x":712,"y":204,"style":696},[48,748],{"x":690,"y":744,"width":691,"height":709,"rx":51,"fill":736,"stroke":737,"style":738},[77,750,271],{"x":694,"y":204,"style":741},[48,752],{"x":700,"y":744,"width":701,"height":709,"rx":51,"fill":54,"stroke":63,"style":687},[77,754,274],{"x":704,"y":204,"style":733},[48,756],{"x":684,"y":757,"width":92,"height":709,"rx":51,"fill":62,"stroke":63,"style":687},"148.0",[77,759,50],{"x":712,"y":760,"style":696},"167.0",[48,762],{"x":690,"y":757,"width":691,"height":709,"rx":51,"fill":54,"stroke":63,"style":687},[77,764,299],{"x":694,"y":760,"style":733},[48,766],{"x":700,"y":757,"width":701,"height":709,"rx":51,"fill":736,"stroke":737,"style":738},[77,768,302],{"x":704,"y":760,"style":741},[48,770],{"x":771,"y":685,"width":92,"height":686,"rx":51,"fill":62,"stroke":63,"style":687},"519.8",[48,773],{"x":774,"y":685,"width":691,"height":686,"rx":51,"fill":62,"stroke":63,"style":687},"551.8",[77,776,697],{"x":777,"y":695,"style":696},"601.1",[48,779],{"x":780,"y":685,"width":781,"height":686,"rx":51,"fill":62,"stroke":63,"style":687},"650.3","67.1",[77,783,705],{"x":784,"y":695,"style":696},"683.9",[48,786],{"x":771,"y":708,"width":92,"height":709,"rx":51,"fill":62,"stroke":63,"style":687},[77,788,100],{"x":789,"y":713,"style":696},"535.8",[48,791],{"x":774,"y":708,"width":691,"height":709,"rx":51,"fill":62,"stroke":63,"style":738},[77,793,237],{"x":777,"y":713,"style":718},[48,795],{"x":780,"y":708,"width":781,"height":709,"rx":51,"fill":62,"stroke":63,"style":738},[77,797,240],{"x":784,"y":713,"style":718},[48,799],{"x":771,"y":725,"width":92,"height":709,"rx":51,"fill":62,"stroke":63,"style":687},[77,801,138],{"x":789,"y":728,"style":696},[48,803],{"x":774,"y":725,"width":691,"height":709,"rx":51,"fill":178,"stroke":179,"style":738},[77,805,257],{"x":777,"y":728,"style":806},"font-size:12px;font-weight:700;fill:var(--teal-ink,#0b6157);text-anchor:middle",[48,808],{"x":780,"y":725,"width":781,"height":709,"rx":51,"fill":178,"stroke":179,"style":738},[77,810,811],{"x":784,"y":728,"style":806},"1200.0",[48,813],{"x":771,"y":744,"width":92,"height":709,"rx":51,"fill":62,"stroke":63,"style":687},[77,815,167],{"x":789,"y":204,"style":696},[48,817],{"x":774,"y":744,"width":691,"height":709,"rx":51,"fill":178,"stroke":179,"style":738},[77,819,257],{"x":777,"y":204,"style":806},[48,821],{"x":780,"y":744,"width":781,"height":709,"rx":51,"fill":178,"stroke":179,"style":738},[77,823,824],{"x":784,"y":204,"style":806},"950.0",[48,826],{"x":771,"y":757,"width":92,"height":709,"rx":51,"fill":62,"stroke":63,"style":687},[77,828,50],{"x":789,"y":760,"style":696},[48,830],{"x":774,"y":757,"width":691,"height":709,"rx":51,"fill":178,"stroke":179,"style":738},[77,832,299],{"x":777,"y":760,"style":806},[48,834],{"x":780,"y":757,"width":781,"height":709,"rx":51,"fill":178,"stroke":179,"style":738},[77,836,837],{"x":784,"y":760,"style":806},"NaN",[77,839,843],{"x":840,"y":841,"style":842},"139.6","29.0","font-size:12.5px;font-weight:700;fill:var(--muted,#5b6780);text-anchor:middle","before",[77,845,847],{"x":846,"y":841,"style":842},"618.6","after",[102,849],{"x1":850,"y1":851,"x2":852,"y2":851,"stroke":107,"style":64},"246.7","108.0","505.8",[109,854],{"points":855,"fill":112},"509.8,108.0 500.8,113.0 500.8,103.0",[48,857],{"x":858,"y":859,"width":860,"height":861,"rx":862,"fill":54,"stroke":63,"style":863},"281.0","75.0","194.5","22.0","11","stroke-width:1.2px",[77,865,869],{"x":866,"y":867,"style":868},"378.2","90.0","font-size:11.5px;font-weight:400;fill:var(--brand-strong,#4338ca);text-anchor:middle;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace","to_datetime \u002F to_numeric",[208,871,873],{"id":872},"step-4-standardise-categories-and-remove-duplicates","Step 4 — Standardise categories and remove duplicates",[10,875,876],{},"Categories typed by hand need a mapping from every variant to one canonical value. Keep the mapping visible and short, and flag anything it does not cover:",[328,878,880],{"className":330,"code":879,"language":332,"meta":333,"style":333},"REGIONS = {\"North\": \"North\", \"Sth\": \"South\", \"South\": \"South\", \"East\": \"East\", \"West\": \"West\"}\ndf[\"Region\"] = df[\"Region\"].map(REGIONS)\nunknown_regions = df.loc[df[\"Region\"].isna(), \"Name\"].tolist()\n\nclean = df.drop_duplicates(subset=[\"Name\", \"Signed up\"], keep=\"first\").reset_index(drop=True)\nlen(raw), len(clean), unknown_regions\n",[14,881,882,940,961,981,987,1033],{"__ignoreMap":333},[337,883,884,887,890,893,896,899,901,903,906,908,911,913,915,917,919,921,924,926,928,930,933,935,937],{"class":102,"line":339},[337,885,886],{"class":366},"REGIONS",[337,888,889],{"class":346}," =",[337,891,892],{"class":342}," {",[337,894,895],{"class":353},"\"North\"",[337,897,898],{"class":342},": ",[337,900,895],{"class":353},[337,902,357],{"class":342},[337,904,905],{"class":353},"\"Sth\"",[337,907,898],{"class":342},[337,909,910],{"class":353},"\"South\"",[337,912,357],{"class":342},[337,914,910],{"class":353},[337,916,898],{"class":342},[337,918,910],{"class":353},[337,920,357],{"class":342},[337,922,923],{"class":353},"\"East\"",[337,925,898],{"class":342},[337,927,923],{"class":353},[337,929,357],{"class":342},[337,931,932],{"class":353},"\"West\"",[337,934,898],{"class":342},[337,936,932],{"class":353},[337,938,939],{"class":342},"}\n",[337,941,942,944,946,948,950,952,954,957,959],{"class":102,"line":373},[337,943,418],{"class":342},[337,945,495],{"class":353},[337,947,424],{"class":342},[337,949,347],{"class":346},[337,951,502],{"class":342},[337,953,495],{"class":353},[337,955,956],{"class":342},"].map(",[337,958,886],{"class":366},[337,960,370],{"class":342},[337,962,963,966,968,971,973,976,978],{"class":102,"line":442},[337,964,965],{"class":342},"unknown_regions ",[337,967,347],{"class":346},[337,969,970],{"class":342}," df.loc[df[",[337,972,495],{"class":353},[337,974,975],{"class":342},"].isna(), ",[337,977,421],{"class":353},[337,979,980],{"class":342},"].tolist()\n",[337,982,983],{"class":102,"line":448},[337,984,986],{"emptyLinePlaceholder":985},true,"\n",[337,988,989,992,994,997,1000,1002,1005,1007,1009,1011,1013,1016,1018,1021,1024,1027,1029,1031],{"class":102,"line":484},[337,990,991],{"class":342},"clean ",[337,993,347],{"class":346},[337,995,996],{"class":342}," df.drop_duplicates(",[337,998,999],{"class":360},"subset",[337,1001,347],{"class":346},[337,1003,1004],{"class":342},"[",[337,1006,421],{"class":353},[337,1008,357],{"class":342},[337,1010,549],{"class":353},[337,1012,561],{"class":342},[337,1014,1015],{"class":360},"keep",[337,1017,347],{"class":346},[337,1019,1020],{"class":353},"\"first\"",[337,1022,1023],{"class":342},").reset_index(",[337,1025,1026],{"class":360},"drop",[337,1028,347],{"class":346},[337,1030,367],{"class":366},[337,1032,370],{"class":342},[337,1034,1035,1038,1041,1043],{"class":102,"line":490},[337,1036,1037],{"class":366},"len",[337,1039,1040],{"class":342},"(raw), ",[337,1042,1037],{"class":366},[337,1044,1045],{"class":342},"(clean), unknown_regions\n",[10,1047,1048,1049,1052,1053,322,1056,1059,1060,1064],{},"The duplicate check runs ",[1050,1051,847],"em",{}," text cleaning on purpose: ",[14,1054,1055],{},"\"  Ana Silva\"",[14,1057,1058],{},"\"ana silva \""," only match once both have been normalised. Choosing the key for duplicates — here name plus sign-up date — is a business decision; ",[23,1061,1063],{"href":1062},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Fpandas-drop-duplicates-from-excel-column\u002F","Pandas: Drop Duplicates From an Excel Column"," discusses the options.",[208,1066,1068],{"id":1067},"step-5-return-the-clean-table-to-the-grid","Step 5 — Return the clean table to the grid",[10,1070,1071,1072,1075,1076,1079],{},"A PY cell that ends with a DataFrame shows it as a ",[1050,1073,1074],{},"Python object"," card by default. To get cells you can chart, filter or reference, switch the output to ",[1050,1077,1078],{},"Excel value"," — from the output menu beside the formula bar, or with Ctrl+Alt+Shift+M — and the DataFrame spills as values:",[328,1081,1083],{"className":330,"code":1082,"language":332,"meta":333,"style":333},"clean\n",[14,1084,1085],{"__ignoreMap":333},[337,1086,1087],{"class":102,"line":339},[337,1088,1082],{"class":342},[10,1090,1091,1092,1095,1096,1099],{},"Leave room below and to the right for the spill; if anything is in the way the cell shows ",[14,1093,1094],{},"#SPILL!",". Other formulas can refer to the spilled result with the spill operator, for example ",[14,1097,1098],{},"=SUM(J2#)"," style references to a column of it, or you can return a single summary instead of the whole table:",[328,1101,1103],{"className":330,"code":1102,"language":332,"meta":333,"style":333},"clean.groupby(\"Region\", dropna=False)[\"Spend\"].sum()\n",[14,1104,1105],{"__ignoreMap":333},[337,1106,1107,1110,1112,1114,1117,1119,1121,1124,1126],{"class":102,"line":339},[337,1108,1109],{"class":342},"clean.groupby(",[337,1111,495],{"class":353},[337,1113,357],{"class":342},[337,1115,1116],{"class":360},"dropna",[337,1118,347],{"class":346},[337,1120,625],{"class":366},[337,1122,1123],{"class":342},")[",[337,1125,587],{"class":353},[337,1127,1128],{"class":342},"].sum()\n",[10,1130,1131],{},"A good pattern is one cell that returns the cleaned table as values for people to use, and a second small cell that returns a list of problems — rows with unknown regions, unparseable dates or missing spend — so the owners of the source data can fix them at the source.",[328,1133,1135],{"className":330,"code":1134,"language":332,"meta":333,"style":333},"problems = df[df[\"Region\"].isna() | df[\"Signed up\"].isna() | df[\"Spend\"].isna()]\nproblems[[\"Name\", \"Region\", \"Signed up\", \"Spend\"]]\n",[14,1136,1137,1170],{"__ignoreMap":333},[337,1138,1139,1142,1144,1147,1149,1152,1155,1157,1159,1161,1163,1165,1167],{"class":102,"line":339},[337,1140,1141],{"class":342},"problems ",[337,1143,347],{"class":346},[337,1145,1146],{"class":342}," df[df[",[337,1148,495],{"class":353},[337,1150,1151],{"class":342},"].isna() ",[337,1153,1154],{"class":346},"|",[337,1156,502],{"class":342},[337,1158,549],{"class":353},[337,1160,1151],{"class":342},[337,1162,1154],{"class":346},[337,1164,502],{"class":342},[337,1166,587],{"class":353},[337,1168,1169],{"class":342},"].isna()]\n",[337,1171,1172,1175,1177,1179,1181,1183,1185,1187,1189],{"class":102,"line":373},[337,1173,1174],{"class":342},"problems[[",[337,1176,421],{"class":353},[337,1178,357],{"class":342},[337,1180,495],{"class":353},[337,1182,357],{"class":342},[337,1184,549],{"class":353},[337,1186,357],{"class":342},[337,1188,587],{"class":353},[337,1190,1191],{"class":342},"]]\n",[208,1193,1195],{"id":1194},"how-calculation-order-and-recalculation-work","How calculation order and recalculation work",[29,1197,38,1203,38,1206,38,1209,38,1214,38,1219,38,1224,38,1228,38,1232,38,1236,38,1239,38,1245,38,1248,38,1253,38,1257,38,1261,38,1265,38,1268,38,1271,38,1274,38,1280,38,1284],{"viewBox":1198,"role":32,"ariaLabelledBy":1199,"xmlns":36,"style":1202},"84 0 592 383",[1200,1201],"pyx-order-t","pyx-order-d","width:100%;max-width:592px;height:auto;display:block;margin:1.5rem auto;font-family:Inter,ui-sans-serif,system-ui,sans-serif",[40,1204,1205],{"id":1200},"The order in which Python cells run",[44,1207,1208],{"id":1201},"Python cells run in row-major order — across each row from left to right, rows from top to bottom, and sheets in tab order. A variable defined in one cell is available to cells that run after it. Editing a cell reruns it and every Python cell after it.",[48,1210],{"x":1211,"y":51,"width":1212,"height":1213,"fill":54},"84","592","383",[48,1215],{"x":1216,"y":58,"width":1217,"height":1218,"rx":61,"fill":116,"stroke":107,"style":64},"100.0","560.0","93.0",[66,1220,1222],{"transform":1221},"translate(368.0,29.0) scale(1.000)",[70,1223],{"d":72,"fill":73,"stroke":123,"style":75},[77,1225,1227],{"x":203,"y":1226,"style":127},"75.5","Sheet 1, row by row, left to right",[77,1229,1231],{"x":203,"y":1230,"style":86},"95.0","raw = xl(...) defined first",[102,1233],{"x1":203,"y1":1234,"x2":203,"y2":1235,"stroke":107,"style":64},"114.0","136.0",[109,1237],{"points":1238,"fill":112},"380.0,140.0 375.0,131.0 385.0,131.0",[77,1240,1244],{"x":1241,"y":1242,"style":1243},"392.0","131.0","font-size:11px;font-weight:700;fill:var(--muted,#5b6780);text-anchor:start","then",[48,1246],{"x":1216,"y":1247,"width":1217,"height":1218,"rx":61,"fill":116,"stroke":107,"style":64},"145.0",[66,1249,1251],{"transform":1250},"translate(368.0,158.0) scale(1.000)",[70,1252],{"d":154,"fill":73,"stroke":123,"style":75},[77,1254,1256],{"x":203,"y":1255,"style":127},"204.5","Later cells on the same sheet",[77,1258,1260],{"x":203,"y":1259,"style":86},"224.0","use raw and df",[102,1262],{"x1":203,"y1":1263,"x2":203,"y2":1264,"stroke":107,"style":64},"243.0","265.0",[109,1266],{"points":1267,"fill":112},"380.0,269.0 375.0,260.0 385.0,260.0",[77,1269,1244],{"x":1241,"y":1270,"style":1243},"260.0",[48,1272],{"x":1216,"y":1273,"width":1217,"height":1218,"rx":61,"fill":178,"stroke":179,"style":64},"274.0",[66,1275,1277],{"transform":1276},"translate(368.0,287.0) scale(1.000)",[70,1278],{"d":1279,"fill":73,"stroke":186,"style":75},"M12 3l9 5-9 5-9-5z M3 13l9 5 9-5 M3 17l9 5 9-5",[77,1281,1283],{"x":203,"y":1282,"style":190},"333.5","Next sheets in tab order",[77,1285,1287],{"x":203,"y":1286,"style":86},"353.0","can use everything above",[10,1289,1290,1291,1294,1295,1297],{},"Python cells share one namespace per workbook and run in row-major order: across the first row from left to right, then the next row, and so on, sheet by sheet in tab order. That is why the cleaning steps above can use variables from earlier cells — and why a cell that uses ",[14,1292,1293],{},"df"," must sit ",[1050,1296,847],{}," the cell that defines it. When a referenced cell or an earlier Python cell changes, the affected Python cells recalculate. On large workbooks, set calculation to partial or manual while editing to avoid rerunning all Python cells on every keystroke.",[208,1299,1301],{"id":1300},"common-pitfalls","Common pitfalls",[1303,1304,1305,1317,1327,1338],"ul",{},[1306,1307,1308,1312,1313,1316],"li",{},[1309,1310,1311],"strong",{},"Using a variable before it is defined."," A cell above or left of the defining cell raises ",[14,1314,1315],{},"NameError",". Keep each chain of cells in reading order.",[1306,1318,1319,1322,1323,1326],{},[1309,1320,1321],{},"Returning objects where values are expected."," A chart or formula that references a Python ",[1050,1324,1325],{},"object"," cell sees a single object, not a table. Switch the output to Excel value.",[1306,1328,1329,1332,1333,1337],{},[1309,1330,1331],{},"Expecting local files or the internet."," Python in Excel cannot read files from your disk or call web APIs; data must come through the workbook. ",[23,1334,1336],{"href":1335},"\u002Fgetting-started-with-python-excel-automation\u002Fusing-python-in-excel\u002Fget-external-data-into-python-in-excel\u002F","Get External Data into Python in Excel with Power Query"," shows the supported route.",[1306,1339,1340,1343],{},[1309,1341,1342],{},"Cleaning in place by hand afterwards."," Edits typed over the spilled output are not possible, and edits to the source should go into the source table — that is what makes the cleaning repeatable.",[208,1345,1347],{"id":1346},"performance-and-scale-notes","Performance and scale notes",[10,1349,1350,1351,1353,1354,391],{},"Python in Excel is designed for analysis-sized data: tens or hundreds of thousands of rows are fine, while very large tables are slow to send to the cloud and back on every recalculation. Keep the source as a proper Excel table so ",[14,1352,20],{}," reads exactly the used range, return values only where people need them, and prefer one cell that builds the cleaned frame over many cells that each copy it. For bulk cleaning of files outside a workbook, a regular Python script with the same pandas code is the better home — compare the options in ",[23,1355,1357],{"href":1356},"\u002Fgetting-started-with-python-excel-automation\u002Fusing-python-in-excel\u002Fpython-in-excel-vs-openpyxl-and-xlwings\u002F","Python in Excel vs openpyxl and xlwings",[208,1359,1361],{"id":1360},"conclusion","Conclusion",[10,1363,1364,1365,1367],{},"Python in Excel turns a cleaning routine into a set of PY cells: read the table with ",[14,1366,20],{},", normalise text, convert dates and numbers explicitly, map categories and remove duplicates after normalising, then return the result as Excel values and list the problems for the source owners. Keep cells in reading order, because they run row by row and share one namespace, and bring external data in through the workbook rather than from Python.",[208,1369,1371],{"id":1370},"frequently-asked-questions","Frequently asked questions",[10,1373,1374,1377],{},[1309,1375,1376],{},"Does cleaning data in Python in Excel change the original table?","\nNo. A PY cell reads the table through xl() and returns a new result. The source cells are never modified, which makes the cleaning repeatable — fix the source and the cleaned output follows.",[10,1379,1380,1383],{},[1309,1381,1382],{},"How do I get the cleaned DataFrame into cells instead of a single card?","\nSwitch the PY cell's output from Python object to Excel value, with the output menu next to the formula bar or the keyboard shortcut Ctrl+Alt+Shift+M. The DataFrame then spills into the grid as a table of values.",[10,1385,1386,1389],{},[1309,1387,1388],{},"Can one PY cell use a DataFrame created in another?","\nYes. Python cells share one namespace per workbook and run in row-major order — left to right, top to bottom, sheet by sheet — so a cell can use variables defined in cells that come before it.",[10,1391,1392,1395,1396,1399],{},[1309,1393,1394],{},"Which pandas version does Python in Excel use?","\nA fixed Anaconda distribution managed by Microsoft, updated from time to time. Check it with a PY cell containing pd.",[1309,1397,1398],{},"version",", and avoid depending on the very newest pandas features.",[208,1401,1403],{"id":1402},"related","Related",[1303,1405,1406,1412,1419,1426],{},[1306,1407,1408,1409,1411],{},"Up one level: ",[23,1410,26],{"href":25}," — how =PY() works.",[1306,1413,1414,1418],{},[23,1415,1417],{"href":1416},"\u002Fgetting-started-with-python-excel-automation\u002Fusing-python-in-excel\u002Freturn-dataframes-and-values-from-python-in-excel-cells\u002F","Return DataFrames and Values from Python in Excel Cells"," — output modes in detail.",[1306,1420,1421,1425],{},[23,1422,1424],{"href":1423},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002F","Cleaning Excel Data With Pandas"," — the same techniques in scripts.",[1306,1427,1428,1432],{},[23,1429,1431],{"href":1430},"\u002Fgetting-started-with-python-excel-automation\u002Fusing-python-in-excel\u002Ffix-python-in-excel-errors\u002F","Fix Python in Excel Errors"," — when a PY cell shows an error.",[1434,1435,1436],"style",{},"html pre.shiki code .skGVy, html code.shiki .skGVy{--shiki-default:#24292E;--shiki-dark:#F0F3F6}html pre.shiki code .s-kum, html code.shiki .s-kum{--shiki-default:#D73A49;--shiki-dark:#FF9492}html pre.shiki code .srMev, html code.shiki .srMev{--shiki-default:#032F62;--shiki-dark:#ADDCFF}html pre.shiki code .sa561, html code.shiki .sa561{--shiki-default:#E36209;--shiki-dark:#FFB757}html pre.shiki code .sP0c6, html code.shiki .sP0c6{--shiki-default:#005CC5;--shiki-dark:#91CBFF}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 .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":333,"searchDepth":373,"depth":373,"links":1438},[1439,1440,1441,1442,1443,1444,1445,1446,1447,1448,1449,1450],{"id":210,"depth":373,"text":211},{"id":308,"depth":373,"text":309},{"id":394,"depth":373,"text":395},{"id":531,"depth":373,"text":532},{"id":872,"depth":373,"text":873},{"id":1067,"depth":373,"text":1068},{"id":1194,"depth":373,"text":1195},{"id":1300,"depth":373,"text":1301},{"id":1346,"depth":373,"text":1347},{"id":1360,"depth":373,"text":1361},{"id":1370,"depth":373,"text":1371},{"id":1402,"depth":373,"text":1403},"2026-09-23","Use pandas inside Excel's =PY() cells to clean a messy table — trim text, fix types, drop duplicates, standardise categories — and return the cleaned table to the grid, with the calculation-order and output-mode rules that make it work.","md",[1455,1457,1459,1461],{"q":1376,"a":1456},"No. A PY cell reads the table through xl() and returns a new result. The source cells are never modified, which makes the cleaning repeatable — fix the source and the cleaned output follows.",{"q":1382,"a":1458},"Switch the PY cell's output from Python object to Excel value, with the output menu next to the formula bar or the keyboard shortcut Ctrl+Alt+Shift+M. The DataFrame then spills into the grid as a table of values.",{"q":1388,"a":1460},"Yes. Python cells share one namespace per workbook and run in row-major order — left to right, top to bottom, sheet by sheet — so a cell can use variables defined in cells that come before it.",{"q":1394,"a":1462},"A fixed Anaconda distribution managed by Microsoft, updated from time to time. Check it with a PY cell containing pd.__version__, and avoid depending on the very newest pandas features.","clean data with pandas in python in excel",null,{"breadcrumb":1466},[1467,1470,1473],{"name":1468,"item":1469},"Home","\u002F",{"name":1471,"item":1472},"Getting Started with Python Excel Automation","\u002Fgetting-started-with-python-excel-automation\u002F",{"name":26,"item":25},"\u002Fgetting-started-with-python-excel-automation\u002Fusing-python-in-excel\u002Fclean-data-with-pandas-in-python-in-excel",{"title":1476,"description":1477},"Clean Excel Data with pandas in Python in Excel (=PY)","Clean a table with pandas in Python in Excel — read it with xl(), fix whitespace, types, duplicates and categories step by step across PY cells, return values to the grid, and avoid recalculation traps.","clean-data-with-pandas-in-python-in-excel","getting-started-with-python-excel-automation\u002Fusing-python-in-excel\u002Fclean-data-with-pandas-in-python-in-excel\u002Findex",[1481,1482,1483],"python-in-excel","data-cleaning","pandas","how-to","zkfTS9JKTswS1hyy8q1ucI0HUFUUzal9hZoSMUiBCPk",[1487,1490],{"title":26,"path":1488,"stem":1489,"children":-1},"\u002Fgetting-started-with-python-excel-automation\u002Fusing-python-in-excel","getting-started-with-python-excel-automation\u002Fusing-python-in-excel\u002Findex",{"title":1431,"path":1491,"stem":1492,"children":-1},"\u002Fgetting-started-with-python-excel-automation\u002Fusing-python-in-excel\u002Ffix-python-in-excel-errors","getting-started-with-python-excel-automation\u002Fusing-python-in-excel\u002Ffix-python-in-excel-errors\u002Findex",[1494,1496],{"path":1495,"title":1471},"\u002Fgetting-started-with-python-excel-automation",{"path":1488,"title":26},[],[1499,1501,1504,1506,1509,1512],{"path":1491,"title":1431,"kind":1500},"fix",{"path":1502,"title":1503,"kind":1484},"\u002Fgetting-started-with-python-excel-automation\u002Fusing-python-in-excel\u002Fforecast-a-time-series-with-python-in-excel","Forecast a Time Series with Python in Excel",{"path":1505,"title":1336,"kind":1484},"\u002Fgetting-started-with-python-excel-automation\u002Fusing-python-in-excel\u002Fget-external-data-into-python-in-excel",{"path":1507,"title":1508,"kind":1484},"\u002Fgetting-started-with-python-excel-automation\u002Fusing-python-in-excel\u002Fplot-charts-with-matplotlib-in-python-in-excel","Plot Charts with matplotlib in Python in Excel",{"path":1510,"title":1357,"kind":1511},"\u002Fgetting-started-with-python-excel-automation\u002Fusing-python-in-excel\u002Fpython-in-excel-vs-openpyxl-and-xlwings","compare",{"path":1513,"title":390,"kind":1484},"\u002Fgetting-started-with-python-excel-automation\u002Fusing-python-in-excel\u002Freference-cells-ranges-and-tables-with-xl-in-python-in-excel",1790972074907]