{"id":29227800,"url":"https://github.com/hansalemaos/a_pandas_ex_plode_tool","last_synced_at":"2025-10-04T19:06:53.439Z","repository":{"id":60424236,"uuid":"543058688","full_name":"hansalemaos/a_pandas_ex_plode_tool","owner":"hansalemaos","description":"Library to handle any nested iterable (list, tuple, dict, json, etc.) in Pandas - no matter how deep it is nested!","archived":false,"fork":false,"pushed_at":"2022-10-09T04:26:54.000Z","size":714,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-08T21:54:07.716Z","etag":null,"topics":["explode","flatten","iterable","json","nested","numpy","pandas","squeeze"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/a-pandas-ex-plode-tool/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hansalemaos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-29T10:27:04.000Z","updated_at":"2023-09-19T12:27:55.000Z","dependencies_parsed_at":"2023-01-19T16:33:13.836Z","dependency_job_id":null,"html_url":"https://github.com/hansalemaos/a_pandas_ex_plode_tool","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hansalemaos/a_pandas_ex_plode_tool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansalemaos%2Fa_pandas_ex_plode_tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansalemaos%2Fa_pandas_ex_plode_tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansalemaos%2Fa_pandas_ex_plode_tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansalemaos%2Fa_pandas_ex_plode_tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hansalemaos","download_url":"https://codeload.github.com/hansalemaos/a_pandas_ex_plode_tool/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansalemaos%2Fa_pandas_ex_plode_tool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277617167,"owners_count":25848271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-30T02:00:09.208Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["explode","flatten","iterable","json","nested","numpy","pandas","squeeze"],"created_at":"2025-07-03T10:01:12.290Z","updated_at":"2025-10-04T19:06:53.370Z","avatar_url":"https://github.com/hansalemaos.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Library to handle any nested iterable (list, tuple, dict, json, etc.) in Pandas - no matter how deeply it is nested!\n\n## Update:\n\n**2022/09/30:** DataFrame is now created directly from iter\n\n**2022/09/30:** No more warning (PerformanceWarning: DataFrame is highly fragmented), when DataFrame is created from a huge nested dict (depth: 1486)  Try it: https://raw.githubusercontent.com/hansalemaos/a_pandas_ex_plode_tool/main/recursion%20_hardcore_test.py\n\n```python\npip install a-pandas-ex-plode-tool\n```\n\n```python\nfrom a_pandas_ex_plode_tool import pd_add_explode_tools\npd_add_explode_tools()\nimport pandas as pd\ndf = pd.read_csv(\"https://github.com/pandas-dev/pandas/raw/main/doc/data/air_quality_long.csv\")\n```\n\n**HANDLE NESTED ITERABLES**\n\nThe code above will add some methods to **pd. / pd.DataFrame / pd.Series**, you can use pandas like you did before, but you will have a couple of methods more:\n\n- pd.Q_AnyNestedIterable_2df()\n- pd.Q_CorruptJsonFile_2dict()\n- pd.Q_ReadFileWithAllEncodings_2df()\n- df.d_filter_dtypes()\n- df.d_multiple_columns_to_one()\n- df.d_df_to_nested_dict()\n- df.d_add_value_to_existing_columns_with_loc()\n- df.d_set_values_with_df_loc()\n- df.d_drop_rows_with_df_loc()\n- df.d_dfloc()\n- df.d_stack()\n- df.d_unstack()\n- df.d_sort_columns_with_sorted()\n- df.d_merge_multiple_dfs_and_series_on_one_column()\n- df.d_merge_multiple_dfs_and_series_on_index()\n- df.d_update_original_iter()\n- df.ds_all_nans_to_pdNA()\n- df.ds_explode_dicts_in_column()\n- df.ds_isna()\n- df.ds_normalize_lists()\n- df.s_delete_duplicates_from_iters_in_cells()\n- df.s_flatten_all_iters_in_cells()\n- df.s_as_flattened_list()\n- df.s_explode_lists_and_tuples()\n\n**All methods added to pandas have one of these prefixes:**\n\n- **ds_** (for DataFrames and Series)\n\n- **s_** (only for Series)\n\n- **d_** (only for DataFrames)\n\n- **Q_** (added to pd.)\n\n### pd.Q_AnyNestedIterable_2df() / df.d_filter_dtypes() / df.d_update_original_iter()\n\n**pd.Q_AnyNestedIterable_2df()** transforms any nasty iterable into a beautiful Pandas DataFrame with a [MultiIndex](https://pandas.pydata.org/docs/user_guide/advanced.html)\n\n**df.d_filter_dtypes()** avoids TypeError Exceptions \n\ndf.loc[df.aa_value \u003e30,'aa_value'] = 90000000  \n\nTraceback (most recent call last):  \n....  \nTypeError: '\u003e' not supported between instances of 'str' and 'int' \n\n***df.loc[df.d_filter_dtypes(allowed_dtypes=(int,float),fillvalue=pd.NA,column='aa_value') \u003e 30] \u003c------- No more exception!***\n\n**df.d_update_original_iter()** After you have updated the DataFrame, you can update the original nasty iterable and keep its ugly structure. \n\n##### I have tested these methods a lot with examples from Stack Overflow. Until now, everything has been working like a charm. Here are about 15 examples!\n\n```python\nNested iterable from: 'https://stackoverflow.com/questions/61984148/how-to-handle-nested-lists-and-dictionaries-in-pandas-dataframe'\n{'critic_reviews': [{'review_critic': 'XYZ', 'review_score': 90},\n                    {'review_critic': 'ABC', 'review_score': 90},\n                    {'review_critic': '123', 'review_score': 90}],\n 'genres': ['Sports', 'Golf'],\n 'score': 85,\n 'title': 'Golf Simulator',\n 'url': 'http://example.com/golf-simulator'}\n\ndf = pd.Q_AnyNestedIterable_2df(data,unstack=False)  # create DF stacked or unstacked, it doesn't matter\n                                                         aa_all_keys                           aa_value\ncritic_reviews 0   review_critic  (critic_reviews, 0, review_critic)                                XYZ\n                   review_score    (critic_reviews, 0, review_score)                                 90\n               1   review_critic  (critic_reviews, 1, review_critic)                                ABC\n                   review_score    (critic_reviews, 1, review_score)                                 90\n               2   review_critic  (critic_reviews, 2, review_critic)                                123\n                   review_score    (critic_reviews, 2, review_score)                                 90\ngenres         0   NaN                                   (genres, 0)                             Sports\n               1   NaN                                   (genres, 1)                               Golf\nscore          NaN NaN                                      (score,)                                 85\ntitle          NaN NaN                                      (title,)                     Golf Simulator\nurl            NaN NaN                                        (url,)  http://example.com/golf-simulator\n\n#Avoid exceptions with df.d_filter_dtypes()\ndf.loc[df.aa_value.str.contains('[Gg]',na=False),'aa_value'] = 'UPDATE1111' #df.loc to update the dataframe (VERY IMPORTANT: To update the original iterable you have to pass 'aa_value')\n                                                         aa_all_keys    aa_value\ncritic_reviews 0   review_critic  (critic_reviews, 0, review_critic)         XYZ\n                   review_score    (critic_reviews, 0, review_score)          90\n               1   review_critic  (critic_reviews, 1, review_critic)         ABC\n                   review_score    (critic_reviews, 1, review_score)          90\n               2   review_critic  (critic_reviews, 2, review_critic)         123\n                   review_score    (critic_reviews, 2, review_score)          90\ngenres         0   NaN                                   (genres, 0)      Sports\n               1   NaN                                   (genres, 1)  UPDATE1111\nscore          NaN NaN                                      (score,)          85\ntitle          NaN NaN                                      (title,)  UPDATE1111\nurl            NaN NaN                                        (url,)  UPDATE1111\nmod_iter = df.d_update_original_iter(data, verbose=True)  #updating the nested iterable, the new values have to be in the column 'aa_value', if you have added new columns to the dataframe, drop them before updating the original iterable\n[genres][1]                                                  Old value: Golf\n[genres][1]                                                  Updated value: UPDATE1111\n[title]                                                      Old value: Golf Simulator\n[title]                                                      Updated value: UPDATE1111\n[url]                                                        Old value: http://example.com/golf-simulator\n[url]                                                        Updated value: UPDATE1111\n\n{'critic_reviews': [{'review_critic': 'XYZ', 'review_score': 90},\n                    {'review_critic': 'ABC', 'review_score': 90},\n                    {'review_critic': '123', 'review_score': 90}],\n 'genres': ['Sports', 'UPDATE1111'],\n 'score': 85,\n 'title': 'UPDATE1111',\n 'url': 'UPDATE1111'}\n```\n\n```python\n#Nested iterable from: \nhttps://stackoverflow.com/questions/73430585/how-to-convert-a-list-of-nested-dictionaries-includes-tuples-as-a-dataframe\ndata=\n[{'cb': ({'ID': 1, 'Name': 'A', 'num': 50}, {'ID': 2, 'Name': 'A', 'num': 68}),\n  'final_value': 118},\n {'cb': ({'ID': 1, 'Name': 'A', 'num': 50}, {'ID': 4, 'Name': 'A', 'num': 67}),\n  'final_value': 117},\n {'cb': ({'ID': 1, 'Name': 'A', 'num': 50}, {'ID': 6, 'Name': 'A', 'num': 67}),\n  'final_value': 117}]\ndf = pd.Q_AnyNestedIterable_2df(data,unstack=False)\n                             aa_all_keys aa_value\n0 cb          0   ID      (0, cb, 0, ID)        1\n                  Name  (0, cb, 0, Name)        A\n                  num    (0, cb, 0, num)       50\n              1   ID      (0, cb, 1, ID)        2\n                  Name  (0, cb, 1, Name)        A\n                  num    (0, cb, 1, num)       68\n  final_value NaN NaN   (0, final_value)      118\n1 cb          0   ID      (1, cb, 0, ID)        1\n                  Name  (1, cb, 0, Name)        A\n                  num    (1, cb, 0, num)       50\n              1   ID      (1, cb, 1, ID)        4\n                  Name  (1, cb, 1, Name)        A\n                  num    (1, cb, 1, num)       67\n  final_value NaN NaN   (1, final_value)      117\n2 cb          0   ID      (2, cb, 0, ID)        1\n                  Name  (2, cb, 0, Name)        A\n                  num    (2, cb, 0, num)       50\n              1   ID      (2, cb, 1, ID)        6\n                  Name  (2, cb, 1, Name)        A\n                  num    (2, cb, 1, num)       67\n  final_value NaN NaN   (2, final_value)      117\ndf.loc[df.d_filter_dtypes(allowed_dtypes=(int,float),fillvalue=pd.NA,column='aa_value') \u003e 30, 'aa_value'] = 900000\n                             aa_all_keys aa_value\n0 cb          0   ID      (0, cb, 0, ID)        1\n                  Name  (0, cb, 0, Name)        A\n                  num    (0, cb, 0, num)   900000\n              1   ID      (0, cb, 1, ID)        2\n                  Name  (0, cb, 1, Name)        A\n                  num    (0, cb, 1, num)   900000\n  final_value NaN NaN   (0, final_value)   900000\n1 cb          0   ID      (1, cb, 0, ID)        1\n                  Name  (1, cb, 0, Name)        A\n                  num    (1, cb, 0, num)   900000\n              1   ID      (1, cb, 1, ID)        4\n                  Name  (1, cb, 1, Name)        A\n                  num    (1, cb, 1, num)   900000\n  final_value NaN NaN   (1, final_value)   900000\n2 cb          0   ID      (2, cb, 0, ID)        1\n                  Name  (2, cb, 0, Name)        A\n                  num    (2, cb, 0, num)   900000\n              1   ID      (2, cb, 1, ID)        6\n                  Name  (2, cb, 1, Name)        A\n                  num    (2, cb, 1, num)   900000\n  final_value NaN NaN   (2, final_value)   900000\nmod_iter = df.d_update_original_iter(data, verbose=True)\n[0][cb][0][num]                                              Old value: 50\n[0][cb][0][num]                                              Updated value: 900000\n[0][cb][1][num]                                              Old value: 68\n[0][cb][1][num]                                              Updated value: 900000\n[0][final_value]                                             Old value: 118\n[0][final_value]                                             Updated value: 900000\n[1][cb][0][num]                                              Old value: 50\n[1][cb][0][num]                                              Updated value: 900000\n[1][cb][1][num]                                              Old value: 67\n[1][cb][1][num]                                              Updated value: 900000\n[1][final_value]                                             Old value: 117\n[1][final_value]                                             Updated value: 900000\n[2][cb][0][num]                                              Old value: 50\n[2][cb][0][num]                                              Updated value: 900000\n[2][cb][1][num]                                              Old value: 67\n[2][cb][1][num]                                              Updated value: 900000\n[2][final_value]                                             Old value: 117\n[2][final_value]                                             Updated value: 900000\n[{'cb': ({'ID': 1, 'Name': 'A', 'num': 900000},\n         {'ID': 2, 'Name': 'A', 'num': 900000}),\n  'final_value': 900000},\n {'cb': ({'ID': 1, 'Name': 'A', 'num': 900000},\n         {'ID': 4, 'Name': 'A', 'num': 900000}),\n  'final_value': 900000},\n {'cb': ({'ID': 1, 'Name': 'A', 'num': 900000},\n         {'ID': 6, 'Name': 'A', 'num': 900000}),\n  'final_value': 900000}]\n```\n\n```python\n#Nested iterable from: \nhttps://stackoverflow.com/questions/69943509/problems-when-flatten-a-dict\ndata=\n[{'application_contacts': [{'adress': 'X', 'email': 'test@test.com'}],\n  'application_details': {'email': None, 'phone': None},\n  'employer': {'Name': 'Nom', 'email': None},\n  'id': '1'},\n {'application_contacts': [{'adress': 'Z', 'email': None}],\n  'application_details': {'email': 'testy@test_a.com', 'phone': None},\n  'employer': {'Name': 'Nom', 'email': None},\n  'id': '2'},\n {'application_contacts': [{'adress': 'Y', 'email': None}],\n  'application_details': {'email': 'testy@test_a.com', 'phone': None},\n  'employer': {'Name': 'Nom', 'email': None},\n  'id': '3'}]\ndf = pd.Q_AnyNestedIterable_2df(data,unstack=False)\n                                                              aa_all_keys          aa_value\n0 application_contacts 0     adress  (0, application_contacts, 0, adress)                 X\n                             email    (0, application_contacts, 0, email)     test@test.com\n  application_details  email NaN          (0, application_details, email)              None\n                       phone NaN          (0, application_details, phone)              None\n  employer             Name  NaN                      (0, employer, Name)               Nom\n                       email NaN                     (0, employer, email)              None\n  id                   NaN   NaN                                  (0, id)                 1\n1 application_contacts 0     adress  (1, application_contacts, 0, adress)                 Z\n                             email    (1, application_contacts, 0, email)              None\n  application_details  email NaN          (1, application_details, email)  testy@test_a.com\n                       phone NaN          (1, application_details, phone)              None\n  employer             Name  NaN                      (1, employer, Name)               Nom\n                       email NaN                     (1, employer, email)              None\n  id                   NaN   NaN                                  (1, id)                 2\n2 application_contacts 0     adress  (2, application_contacts, 0, adress)                 Y\n                             email    (2, application_contacts, 0, email)              None\n  application_details  email NaN          (2, application_details, email)  testy@test_a.com\n                       phone NaN          (2, application_details, phone)              None\n  employer             Name  NaN                      (2, employer, Name)               Nom\n                       email NaN                     (2, employer, email)              None\n  id                   NaN   NaN                                  (2, id)                 3\ndf.loc[df.d_filter_dtypes(allowed_dtypes=(str),fillvalue=pd.NA,column='aa_value').str.contains(r'test_a\\.\\w+\\b',na=False), 'aa_value'] = 'UPPPPPPPPPPPPPPPDATE.COM'\n                                                              aa_all_keys                  aa_value\n0 application_contacts 0     adress  (0, application_contacts, 0, adress)                         X\n                             email    (0, application_contacts, 0, email)             test@test.com\n  application_details  email NaN          (0, application_details, email)                      None\n                       phone NaN          (0, application_details, phone)                      None\n  employer             Name  NaN                      (0, employer, Name)                       Nom\n                       email NaN                     (0, employer, email)                      None\n  id                   NaN   NaN                                  (0, id)                         1\n1 application_contacts 0     adress  (1, application_contacts, 0, adress)                         Z\n                             email    (1, application_contacts, 0, email)                      None\n  application_details  email NaN          (1, application_details, email)  UPPPPPPPPPPPPPPPDATE.COM\n                       phone NaN          (1, application_details, phone)                      None\n  employer             Name  NaN                      (1, employer, Name)                       Nom\n                       email NaN                     (1, employer, email)                      None\n  id                   NaN   NaN                                  (1, id)                         2\n2 application_contacts 0     adress  (2, application_contacts, 0, adress)                         Y\n                             email    (2, application_contacts, 0, email)                      None\n  application_details  email NaN          (2, application_details, email)  UPPPPPPPPPPPPPPPDATE.COM\n                       phone NaN          (2, application_details, phone)                      None\n  employer             Name  NaN                      (2, employer, Name)                       Nom\n                       email NaN                     (2, employer, email)                      None\n  id                   NaN   NaN                                  (2, id)                         3\nmod_iter = df.d_update_original_iter(data, verbose=True)\n[1][application_details][email]                              Old value: testy@test_a.com\n[1][application_details][email]                              Updated value: UPPPPPPPPPPPPPPPDATE.COM\n[2][application_details][email]                              Old value: testy@test_a.com\n[2][application_details][email]                              Updated value: UPPPPPPPPPPPPPPPDATE.COM\n[{'application_contacts': [{'adress': 'X', 'email': 'test@test.com'}],\n  'application_details': {'email': None, 'phone': None},\n  'employer': {'Name': 'Nom', 'email': None},\n  'id': '1'},\n {'application_contacts': [{'adress': 'Z', 'email': None}],\n  'application_details': {'email': 'UPPPPPPPPPPPPPPPDATE.COM', 'phone': None},\n  'employer': {'Name': 'Nom', 'email': None},\n  'id': '2'},\n {'application_contacts': [{'adress': 'Y', 'email': None}],\n  'application_details': {'email': 'UPPPPPPPPPPPPPPPDATE.COM', 'phone': None},\n  'employer': {'Name': 'Nom', 'email': None},\n  'id': '3'}]\n```\n\n```python\n#Nested iterable from: \nhttps://stackoverflow.com/questions/62765371/convert-nested-dataframe-to-a-simple-dataframeframe\ndata=\n{'A': [1, 2, 3],\n 'B': [4, 5, 6],\n 'departure': [{'actual': None,\n                'actual_runway': None,\n                'airport': 'Findel',\n                'delay': None,\n                'estimated': '2020-07-07T06:30:00+00:00',\n                'estimated_runway': None,\n                'gate': None,\n                'iata': 'LUX',\n                'icao': 'ELLX',\n                'scheduled': '2020-07-07T06:30:00+00:00',\n                'terminal': None,\n                'timezone': 'Europe/Luxembourg'},\n               {'actual': None,\n                'actual_runway': None,\n                'airport': 'Findel',\n                'delay': None,\n                'estimated': '2020-07-07T06:30:00+00:00',\n                'estimated_runway': None,\n                'gate': None,\n                'iata': 'LUX',\n                'icao': 'ELLX',\n                'scheduled': '2020-07-07T06:30:00+00:00',\n                'terminal': None,\n                'timezone': 'Europe/Luxembourg'},\n               {'actual': None,\n                'actual_runway': None,\n                'airport': 'Findel',\n                'delay': None,\n                'estimated': '2020-07-07T06:30:00+00:00',\n                'estimated_runway': None,\n                'gate': None,\n                'iata': 'LUX',\n                'icao': 'ELLX',\n                'scheduled': '2020-07-07T06:30:00+00:00',\n                'terminal': None,\n                'timezone': 'Europe/Luxembourg'}]}\ndf = pd.Q_AnyNestedIterable_2df(data,unstack=False)\n                                                   aa_all_keys                   aa_value\nA         0 NaN                                         (A, 0)                          1\n          1 NaN                                         (A, 1)                          2\n          2 NaN                                         (A, 2)                          3\nB         0 NaN                                         (B, 0)                          4\n          1 NaN                                         (B, 1)                          5\n          2 NaN                                         (B, 2)                          6\ndeparture 0 actual                      (departure, 0, actual)                       None\n            actual_runway        (departure, 0, actual_runway)                       None\n            airport                    (departure, 0, airport)                     Findel\n            delay                        (departure, 0, delay)                       None\n            estimated                (departure, 0, estimated)  2020-07-07T06:30:00+00:00\n            estimated_runway  (departure, 0, estimated_runway)                       None\n            gate                          (departure, 0, gate)                       None\n            iata                          (departure, 0, iata)                        LUX\n            icao                          (departure, 0, icao)                       ELLX\n            scheduled                (departure, 0, scheduled)  2020-07-07T06:30:00+00:00\n            terminal                  (departure, 0, terminal)                       None\n            timezone                  (departure, 0, timezone)          Europe/Luxembourg\n          1 actual                      (departure, 1, actual)                       None\n            actual_runway        (departure, 1, actual_runway)                       None\n            airport                    (departure, 1, airport)                     Findel\n            delay                        (departure, 1, delay)                       None\n            estimated                (departure, 1, estimated)  2020-07-07T06:30:00+00:00\n            estimated_runway  (departure, 1, estimated_runway)                       None\n            gate                          (departure, 1, gate)                       None\n            iata                          (departure, 1, iata)                        LUX\n            icao                          (departure, 1, icao)                       ELLX\n            scheduled                (departure, 1, scheduled)  2020-07-07T06:30:00+00:00\n            terminal                  (departure, 1, terminal)                       None\n            timezone                  (departure, 1, timezone)          Europe/Luxembourg\n          2 actual                      (departure, 2, actual)                       None\n            actual_runway        (departure, 2, actual_runway)                       None\n            airport                    (departure, 2, airport)                     Findel\n            delay                        (departure, 2, delay)                       None\n            estimated                (departure, 2, estimated)  2020-07-07T06:30:00+00:00\n            estimated_runway  (departure, 2, estimated_runway)                       None\n            gate                          (departure, 2, gate)                       None\n            iata                          (departure, 2, iata)                        LUX\n            icao                          (departure, 2, icao)                       ELLX\n            scheduled                (departure, 2, scheduled)  2020-07-07T06:30:00+00:00\n            terminal                  (departure, 2, terminal)                       None\n            timezone                  (departure, 2, timezone)          Europe/Luxembourg\ndf.loc[df.d_filter_dtypes(allowed_dtypes=(str),fillvalue=pd.NA,column='aa_value')== 'ELLX', 'aa_value'] = 'ELLX-UPDATED'\n                                                   aa_all_keys                   aa_value\nA         0 NaN                                         (A, 0)                          1\n          1 NaN                                         (A, 1)                          2\n          2 NaN                                         (A, 2)                          3\nB         0 NaN                                         (B, 0)                          4\n          1 NaN                                         (B, 1)                          5\n          2 NaN                                         (B, 2)                          6\ndeparture 0 actual                      (departure, 0, actual)                       None\n            actual_runway        (departure, 0, actual_runway)                       None\n            airport                    (departure, 0, airport)                     Findel\n            delay                        (departure, 0, delay)                       None\n            estimated                (departure, 0, estimated)  2020-07-07T06:30:00+00:00\n            estimated_runway  (departure, 0, estimated_runway)                       None\n            gate                          (departure, 0, gate)                       None\n            iata                          (departure, 0, iata)                        LUX\n            icao                          (departure, 0, icao)               ELLX-UPDATED\n            scheduled                (departure, 0, scheduled)  2020-07-07T06:30:00+00:00\n            terminal                  (departure, 0, terminal)                       None\n            timezone                  (departure, 0, timezone)          Europe/Luxembourg\n          1 actual                      (departure, 1, actual)                       None\n            actual_runway        (departure, 1, actual_runway)                       None\n            airport                    (departure, 1, airport)                     Findel\n            delay                        (departure, 1, delay)                       None\n            estimated                (departure, 1, estimated)  2020-07-07T06:30:00+00:00\n            estimated_runway  (departure, 1, estimated_runway)                       None\n            gate                          (departure, 1, gate)                       None\n            iata                          (departure, 1, iata)                        LUX\n            icao                          (departure, 1, icao)               ELLX-UPDATED\n            scheduled                (departure, 1, scheduled)  2020-07-07T06:30:00+00:00\n            terminal                  (departure, 1, terminal)                       None\n            timezone                  (departure, 1, timezone)          Europe/Luxembourg\n          2 actual                      (departure, 2, actual)                       None\n            actual_runway        (departure, 2, actual_runway)                       None\n            airport                    (departure, 2, airport)                     Findel\n            delay                        (departure, 2, delay)                       None\n            estimated                (departure, 2, estimated)  2020-07-07T06:30:00+00:00\n            estimated_runway  (departure, 2, estimated_runway)                       None\n            gate                          (departure, 2, gate)                       None\n            iata                          (departure, 2, iata)                        LUX\n            icao                          (departure, 2, icao)               ELLX-UPDATED\n            scheduled                (departure, 2, scheduled)  2020-07-07T06:30:00+00:00\n            terminal                  (departure, 2, terminal)                       None\n            timezone                  (departure, 2, timezone)          Europe/Luxembourg\nmod_iter = df.d_update_original_iter(data, verbose=True)\n[departure][0][icao]                                         Old value: ELLX\n[departure][0][icao]                                         Updated value: ELLX-UPDATED\n[departure][1][icao]                                         Old value: ELLX\n[departure][1][icao]                                         Updated value: ELLX-UPDATED\n[departure][2][icao]                                         Old value: ELLX\n[departure][2][icao]                                         Updated value: ELLX-UPDATED\n{'A': [1, 2, 3],\n 'B': [4, 5, 6],\n 'departure': [{'actual': None,\n                'actual_runway': None,\n                'airport': 'Findel',\n                'delay': None,\n                'estimated': '2020-07-07T06:30:00+00:00',\n                'estimated_runway': None,\n                'gate': None,\n                'iata': 'LUX',\n                'icao': 'ELLX-UPDATED',\n                'scheduled': '2020-07-07T06:30:00+00:00',\n                'terminal': None,\n                'timezone': 'Europe/Luxembourg'},\n               {'actual': None,\n                'actual_runway': None,\n                'airport': 'Findel',\n                'delay': None,\n                'estimated': '2020-07-07T06:30:00+00:00',\n                'estimated_runway': None,\n                'gate': None,\n                'iata': 'LUX',\n                'icao': 'ELLX-UPDATED',\n                'scheduled': '2020-07-07T06:30:00+00:00',\n                'terminal': None,\n                'timezone': 'Europe/Luxembourg'},\n               {'actual': None,\n                'actual_runway': None,\n                'airport': 'Findel',\n                'delay': None,\n                'estimated': '2020-07-07T06:30:00+00:00',\n                'estimated_runway': None,\n                'gate': None,\n                'iata': 'LUX',\n                'icao': 'ELLX-UPDATED',\n                'scheduled': '2020-07-07T06:30:00+00:00',\n                'terminal': None,\n                'timezone': 'Europe/Luxembourg'}]}\n```\n\n```python\n#Nested iterable from: \nhttps://stackoverflow.com/questions/64359762/constructing-a-pandas-dataframe-with-columns-and-sub-columns-from-nested-diction\ndata=\n{'level1': {'t1': {'s1': {'col1': 5, 'col2': 4, 'col3': 4, 'col4': 9},\n                   's2': {'col1': 1, 'col2': 5, 'col3': 4, 'col4': 8},\n                   's3': {'col1': 11, 'col2': 8, 'col3': 2, 'col4': 9},\n                   's4': {'col1': 5, 'col2': 4, 'col3': 4, 'col4': 9}},\n            't2': {'s1': {'col1': 5, 'col2': 4, 'col3': 4, 'col4': 9},\n                   's2': {'col1': 1, 'col2': 5, 'col3': 4, 'col4': 8},\n                   's3': {'col1': 11, 'col2': 8, 'col3': 2, 'col4': 9},\n                   's4': {'col1': 5, 'col2': 4, 'col3': 4, 'col4': 9}},\n            't3': {'s1': {'col1': 1, 'col2': 2, 'col3': 3, 'col4': 4},\n                   's2': {'col1': 5, 'col2': 6, 'col3': 7, 'col4': 8},\n                   's3': {'col1': 9, 'col2': 10, 'col3': 11, 'col4': 12},\n                   's4': {'col1': 13, 'col2': 14, 'col3': 15, 'col4': 16}}},\n 'level2': {'t1': {'s1': {'col1': 5, 'col2': 4, 'col3': 9, 'col4': 9},\n                   's2': {'col1': 1, 'col2': 5, 'col3': 4, 'col4': 5},\n                   's3': {'col1': 11, 'col2': 8, 'col3': 2, 'col4': 13},\n                   's4': {'col1': 5, 'col2': 4, 'col3': 4, 'col4': 20}},\n            't2': {'s1': {'col1': 5, 'col2': 4, 'col3': 4, 'col4': 9},\n                   's2': {'col1': 1, 'col2': 5, 'col3': 4, 'col4': 8},\n                   's3': {'col1': 11, 'col2': 8, 'col3': 2, 'col4': 9},\n                   's4': {'col1': 5, 'col2': 4, 'col3': 4, 'col4': 9}},\n            't3': {'s1': {'col1': 1, 'col2': 2, 'col3': 3, 'col4': 4},\n                   's2': {'col1': 5, 'col2': 6, 'col3': 7, 'col4': 8},\n                   's3': {'col1': 9, 'col2': 10, 'col3': 11, 'col4': 12},\n                   's4': {'col1': 13, 'col2': 14, 'col3': 15, 'col4': 16}}}}\ndf = pd.Q_AnyNestedIterable_2df(data,unstack=False)\n                              aa_all_keys  aa_value\nlevel1 t1 s1 col1  (level1, t1, s1, col1)         5\n             col2  (level1, t1, s1, col2)         4\n             col3  (level1, t1, s1, col3)         4\n             col4  (level1, t1, s1, col4)         9\n          s2 col1  (level1, t1, s2, col1)         1\n                                   ...       ...\nlevel2 t3 s3 col4  (level2, t3, s3, col4)        12\n          s4 col1  (level2, t3, s4, col1)        13\n             col2  (level2, t3, s4, col2)        14\n             col3  (level2, t3, s4, col3)        15\n             col4  (level2, t3, s4, col4)        16\n[96 rows x 2 columns]\ndf.loc[(df.d_filter_dtypes(allowed_dtypes=(int),fillvalue=pd.NA,column='aa_value') \u003e 5) \u0026 (df.d_filter_dtypes(allowed_dtypes=(int),fillvalue=pd.NA,column='aa_value') \u003c 10), 'aa_value'] = 1000000\n                              aa_all_keys  aa_value\nlevel1 t1 s1 col1  (level1, t1, s1, col1)         5\n             col2  (level1, t1, s1, col2)         4\n             col3  (level1, t1, s1, col3)         4\n             col4  (level1, t1, s1, col4)   1000000\n          s2 col1  (level1, t1, s2, col1)         1\n                                   ...       ...\nlevel2 t3 s3 col4  (level2, t3, s3, col4)        12\n          s4 col1  (level2, t3, s4, col1)        13\n             col2  (level2, t3, s4, col2)        14\n             col3  (level2, t3, s4, col3)        15\n             col4  (level2, t3, s4, col4)        16\n[96 rows x 2 columns]\nmod_iter = df.d_update_original_iter(data, verbose=True)\n[level1][t1][s1][col4]                                       Old value: 9\n[level1][t1][s1][col4]                                       Updated value: 1000000\n[level1][t1][s2][col4]                                       Old value: 8\n[level1][t1][s2][col4]                                       Updated value: 1000000\n[level1][t1][s3][col2]                                       Old value: 8\n[level1][t1][s3][col2]                                       Updated value: 1000000\n[level1][t1][s3][col4]                                       Old value: 9\n[level1][t1][s3][col4]                                       Updated value: 1000000\n[level1][t1][s4][col4]                                       Old value: 9\n[level1][t1][s4][col4]                                       Updated value: 1000000\n[level1][t2][s1][col4]                                       Old value: 9\n[level1][t2][s1][col4]                                       Updated value: 1000000\n[level1][t2][s2][col4]                                       Old value: 8\n[level1][t2][s2][col4]                                       Updated value: 1000000\n[level1][t2][s3][col2]                                       Old value: 8\n[level1][t2][s3][col2]                                       Updated value: 1000000\n[level1][t2][s3][col4]                                       Old value: 9\n[level1][t2][s3][col4]                                       Updated value: 1000000\n[level1][t2][s4][col4]                                       Old value: 9\n[level1][t2][s4][col4]                                       Updated value: 1000000\n[level1][t3][s2][col2]                                       Old value: 6\n[level1][t3][s2][col2]                                       Updated value: 1000000\n[level1][t3][s2][col3]                                       Old value: 7\n[level1][t3][s2][col3]                                       Updated value: 1000000\n[level1][t3][s2][col4]                                       Old value: 8\n[level1][t3][s2][col4]                                       Updated value: 1000000\n[level1][t3][s3][col1]                                       Old value: 9\n[level1][t3][s3][col1]                                       Updated value: 1000000\n[level2][t1][s1][col3]                                       Old value: 9\n[level2][t1][s1][col3]                                       Updated value: 1000000\n[level2][t1][s1][col4]                                       Old value: 9\n[level2][t1][s1][col4]                                       Updated value: 1000000\n[level2][t1][s3][col2]                                       Old value: 8\n[level2][t1][s3][col2]                                       Updated value: 1000000\n[level2][t2][s1][col4]                                       Old value: 9\n[level2][t2][s1][col4]                                       Updated value: 1000000\n[level2][t2][s2][col4]                                       Old value: 8\n[level2][t2][s2][col4]                                       Updated value: 1000000\n[level2][t2][s3][col2]                                       Old value: 8\n[level2][t2][s3][col2]                                       Updated value: 1000000\n[level2][t2][s3][col4]                                       Old value: 9\n[level2][t2][s3][col4]                                       Updated value: 1000000\n[level2][t2][s4][col4]                                       Old value: 9\n[level2][t2][s4][col4]                                       Updated value: 1000000\n[level2][t3][s2][col2]                                       Old value: 6\n[level2][t3][s2][col2]                                       Updated value: 1000000\n[level2][t3][s2][col3]                                       Old value: 7\n[level2][t3][s2][col3]                                       Updated value: 1000000\n[level2][t3][s2][col4]                                       Old value: 8\n[level2][t3][s2][col4]                                       Updated value: 1000000\n[level2][t3][s3][col1]                                       Old value: 9\n[level2][t3][s3][col1]                                       Updated value: 1000000\n{'level1': {'t1': {'s1': {'col1': 5, 'col2': 4, 'col3': 4, 'col4': 1000000},\n                   's2': {'col1': 1, 'col2': 5, 'col3': 4, 'col4': 1000000},\n                   's3': {'col1': 11,\n                          'col2': 1000000,\n                          'col3': 2,\n                          'col4': 1000000},\n                   's4': {'col1': 5, 'col2': 4, 'col3': 4, 'col4': 1000000}},\n            't2': {'s1': {'col1': 5, 'col2': 4, 'col3': 4, 'col4': 1000000},\n                   's2': {'col1': 1, 'col2': 5, 'col3': 4, 'col4': 1000000},\n                   's3': {'col1': 11,\n                          'col2': 1000000,\n                          'col3': 2,\n                          'col4': 1000000},\n                   's4': {'col1': 5, 'col2': 4, 'col3': 4, 'col4': 1000000}},\n            't3': {'s1': {'col1': 1, 'col2': 2, 'col3': 3, 'col4': 4},\n                   's2': {'col1': 5,\n                          'col2': 1000000,\n                          'col3': 1000000,\n                          'col4': 1000000},\n                   's3': {'col1': 1000000, 'col2': 10, 'col3': 11, 'col4': 12},\n                   's4': {'col1': 13, 'col2': 14, 'col3': 15, 'col4': 16}}},\n 'level2': {'t1': {'s1': {'col1': 5,\n                          'col2': 4,\n                          'col3': 1000000,\n                          'col4': 1000000},\n                   's2': {'col1': 1, 'col2': 5, 'col3': 4, 'col4': 5},\n                   's3': {'col1': 11, 'col2': 1000000, 'col3': 2, 'col4': 13},\n                   's4': {'col1': 5, 'col2': 4, 'col3': 4, 'col4': 20}},\n            't2': {'s1': {'col1': 5, 'col2': 4, 'col3': 4, 'col4': 1000000},\n                   's2': {'col1': 1, 'col2': 5, 'col3': 4, 'col4': 1000000},\n                   's3': {'col1': 11,\n                          'col2': 1000000,\n                          'col3': 2,\n                          'col4': 1000000},\n                   's4': {'col1': 5, 'col2': 4, 'col3': 4, 'col4': 1000000}},\n            't3': {'s1': {'col1': 1, 'col2': 2, 'col3': 3, 'col4': 4},\n                   's2': {'col1': 5,\n                          'col2': 1000000,\n                          'col3': 1000000,\n                          'col4': 1000000},\n                   's3': {'col1': 1000000, 'col2': 10, 'col3': 11, 'col4': 12},\n                   's4': {'col1': 13, 'col2': 14, 'col3': 15, 'col4': 16}}}}\n```\n\n```python\n#Nested iterable from: \nhttps://stackoverflow.com/questions/72146094/problems-matching-values-from-nested-dictionary\ndata=\n{'_links': {'next': None, 'prev': None},\n 'limit': 250,\n 'offset': 0,\n 'runs': [{'assignedto_id': None,\n           'blocked_count': 0,\n           'completed_on': None,\n           'config': None,\n           'config_ids': [],\n           'created_by': 1,\n           'created_on': 1651790693,\n           'custom_status1_count': 0,\n           'custom_status2_count': 0,\n           'custom_status3_count': 0,\n           'custom_status4_count': 0,\n           'custom_status5_count': 0,\n           'custom_status6_count': 0,\n           'custom_status7_count': 0,\n           'description': None,\n           'failed_count': 1,\n           'id': 13,\n           'include_all': False,\n           'is_completed': False,\n           'milestone_id': None,\n           'name': '2022-05-05-testrun',\n           'passed_count': 2,\n           'plan_id': None,\n           'project_id': 1,\n           'refs': None,\n           'retest_count': 0,\n           'suite_id': 1,\n           'untested_count': 0,\n           'updated_on': 1651790693,\n           'url': 'https://xxxxxxxxxx.testrail.io/index.php?/runs/view/13'},\n          {'assignedto_id': None,\n           'blocked_count': 0,\n           'completed_on': 1650989972,\n           'config': None,\n           'config_ids': [],\n           'created_by': 5,\n           'created_on': 1650966329,\n           'custom_status1_count': 0,\n           'custom_status2_count': 0,\n           'custom_status3_count': 0,\n           'custom_status4_count': 0,\n           'custom_status5_count': 0,\n           'custom_status6_count': 0,\n           'custom_status7_count': 0,\n           'description': None,\n           'failed_count': 0,\n           'id': 9,\n           'include_all': False,\n           'is_completed': True,\n           'milestone_id': None,\n           'name': 'This is a new test run',\n           'passed_count': 0,\n           'plan_id': None,\n           'project_id': 1,\n           'refs': None,\n           'retest_count': 0,\n           'suite_id': 1,\n           'untested_count': 3,\n           'updated_on': 1650966329,\n           'url': 'https://xxxxxxxxxx.testrail.io/index.php?/runs/view/9'}],\n 'size': 2}\ndf = pd.Q_AnyNestedIterable_2df(data,unstack=False)\n                                          aa_all_keys                                           aa_value\n_links next NaN                        (_links, next)                                               None\n       prev NaN                        (_links, prev)                                               None\nlimit  NaN  NaN                              (limit,)                                                250\noffset NaN  NaN                             (offset,)                                                  0\nruns   0    assignedto_id    (runs, 0, assignedto_id)                                               None\n                                               ...                                                ...\n       1    suite_id              (runs, 1, suite_id)                                                  1\n            untested_count  (runs, 1, untested_count)                                                  3\n            updated_on          (runs, 1, updated_on)                                         1650966329\n            url                        (runs, 1, url)  https://xxxxxxxxxx.testrail.io/index.php?/runs...\nsize   NaN  NaN                               (size,)                                                  2\n[63 rows x 2 columns]\ndf.loc[(df.d_filter_dtypes(allowed_dtypes=(bool),fillvalue=pd.NA,column='aa_value') == False ), 'aa_value'] = True\ndf.loc[(df.d_filter_dtypes(allowed_dtypes=(str),fillvalue=pd.NA,column='aa_value').str.contains(r'https?://.*',na=False) ), 'aa_value'] = 'WWW.PYTHON.ORG'\n                                          aa_all_keys        aa_value\n_links next NaN                        (_links, next)            None\n       prev NaN                        (_links, prev)            None\nlimit  NaN  NaN                              (limit,)             250\noffset NaN  NaN                             (offset,)               0\nruns   0    assignedto_id    (runs, 0, assignedto_id)            None\n                                               ...             ...\n       1    suite_id              (runs, 1, suite_id)               1\n            untested_count  (runs, 1, untested_count)               3\n            updated_on          (runs, 1, updated_on)      1650966329\n            url                        (runs, 1, url)  WWW.PYTHON.ORG\nsize   NaN  NaN                               (size,)               2\n[63 rows x 2 columns]\nmod_iter = df.d_update_original_iter(data, verbose=True)\n[runs][0][include_all]                                       Old value: False\n[runs][0][include_all]                                       Updated value: True\n[runs][0][is_completed]                                      Old value: False\n[runs][0][is_completed]                                      Updated value: True\n[runs][0][url]                                               Old value: https://xxxxxxxxxx.testrail.io/index.php?/runs/view/13\n[runs][0][url]                                               Updated value: WWW.PYTHON.ORG\n[runs][1][include_all]                                       Old value: False\n[runs][1][include_all]                                       Updated value: True\n[runs][1][url]                                               Old value: https://xxxxxxxxxx.testrail.io/index.php?/runs/view/9\n[runs][1][url]                                               Updated value: WWW.PYTHON.ORG\n{'_links': {'next': None, 'prev': None},\n 'limit': 250,\n 'offset': 0,\n 'runs': [{'assignedto_id': None,\n           'blocked_count': 0,\n           'completed_on': None,\n           'config': None,\n           'config_ids': [],\n           'created_by': 1,\n           'created_on': 1651790693,\n           'custom_status1_count': 0,\n           'custom_status2_count': 0,\n           'custom_status3_count': 0,\n           'custom_status4_count': 0,\n           'custom_status5_count': 0,\n           'custom_status6_count': 0,\n           'custom_status7_count': 0,\n           'description': None,\n           'failed_count': 1,\n           'id': 13,\n           'include_all': True,\n           'is_completed': True,\n           'milestone_id': None,\n           'name': '2022-05-05-testrun',\n           'passed_count': 2,\n           'plan_id': None,\n           'project_id': 1,\n           'refs': None,\n           'retest_count': 0,\n           'suite_id': 1,\n           'untested_count': 0,\n           'updated_on': 1651790693,\n           'url': 'WWW.PYTHON.ORG'},\n          {'assignedto_id': None,\n           'blocked_count': 0,\n           'completed_on': 1650989972,\n           'config': None,\n           'config_ids': [],\n           'created_by': 5,\n           'created_on': 1650966329,\n           'custom_status1_count': 0,\n           'custom_status2_count': 0,\n           'custom_status3_count': 0,\n           'custom_status4_count': 0,\n           'custom_status5_count': 0,\n           'custom_status6_count': 0,\n           'custom_status7_count': 0,\n           'description': None,\n           'failed_count': 0,\n           'id': 9,\n           'include_all': True,\n           'is_completed': True,\n           'milestone_id': None,\n           'name': 'This is a new test run',\n           'passed_count': 0,\n           'plan_id': None,\n           'project_id': 1,\n           'refs': None,\n           'retest_count': 0,\n           'suite_id': 1,\n           'untested_count': 3,\n           'updated_on': 1650966329,\n           'url': 'WWW.PYTHON.ORG'}],\n 'size': 2}\n```\n\n```python\n#Nested iterable from: \nhttps://stackoverflow.com/questions/73708706/how-to-get-values-from-list-of-nested-dictionaries/73839430#73839430\ndata=\n{'results': [{'end_time': '2021-01-21',\n              'key': 'q1',\n              'result_type': 'multipleChoice',\n              'start_time': '2021-01-21',\n              'value': ['1']},\n             {'end_time': '2021-01-21',\n              'key': 'q2',\n              'result_type': 'multipleChoice',\n              'start_time': '2021-01-21',\n              'value': ['False']},\n             {'end_time': '2021-01-21',\n              'key': 'q3',\n              'result_type': 'multipleChoice',\n              'start_time': '2021-01-21',\n              'value': ['3']},\n             {'end_time': '2021-01-21',\n              'key': 'q4',\n              'result_type': 'multipleChoice',\n              'start_time': '2021-01-21',\n              'value': ['3']}]}\ndf = pd.Q_AnyNestedIterable_2df(data,unstack=False)\n                                         aa_all_keys        aa_value\nresults 0 end_time    NaN     (results, 0, end_time)      2021-01-21\n          key         NaN          (results, 0, key)              q1\n          result_type NaN  (results, 0, result_type)  multipleChoice\n          start_time  NaN   (results, 0, start_time)      2021-01-21\n          value       0       (results, 0, value, 0)               1\n        1 end_time    NaN     (results, 1, end_time)      2021-01-21\n          key         NaN          (results, 1, key)              q2\n          result_type NaN  (results, 1, result_type)  multipleChoice\n          start_time  NaN   (results, 1, start_time)      2021-01-21\n          value       0       (results, 1, value, 0)           False\n        2 end_time    NaN     (results, 2, end_time)      2021-01-21\n          key         NaN          (results, 2, key)              q3\n          result_type NaN  (results, 2, result_type)  multipleChoice\n          start_time  NaN   (results, 2, start_time)      2021-01-21\n          value       0       (results, 2, value, 0)               3\n        3 end_time    NaN     (results, 3, end_time)      2021-01-21\n          key         NaN          (results, 3, key)              q4\n          result_type NaN  (results, 3, result_type)  multipleChoice\n          start_time  NaN   (results, 3, start_time)      2021-01-21\n          value       0       (results, 3, value, 0)               3\ndf.loc[(df.d_filter_dtypes(allowed_dtypes=(str),fillvalue=pd.NA,column='aa_value').str.contains(r'^2021.*',na=False) ), 'aa_value'] = 10000000000 \n                                         aa_all_keys        aa_value\nresults 0 end_time    NaN     (results, 0, end_time)     10000000000\n          key         NaN          (results, 0, key)              q1\n          result_type NaN  (results, 0, result_type)  multipleChoice\n          start_time  NaN   (results, 0, start_time)     10000000000\n          value       0       (results, 0, value, 0)               1\n        1 end_time    NaN     (results, 1, end_time)     10000000000\n          key         NaN          (results, 1, key)              q2\n          result_type NaN  (results, 1, result_type)  multipleChoice\n          start_time  NaN   (results, 1, start_time)     10000000000\n          value       0       (results, 1, value, 0)           False\n        2 end_time    NaN     (results, 2, end_time)     10000000000\n          key         NaN          (results, 2, key)              q3\n          result_type NaN  (results, 2, result_type)  multipleChoice\n          start_time  NaN   (results, 2, start_time)     10000000000\n          value       0       (results, 2, value, 0)               3\n        3 end_time    NaN     (results, 3, end_time)     10000000000\n          key         NaN          (results, 3, key)              q4\n          result_type NaN  (results, 3, result_type)  multipleChoice\n          start_time  NaN   (results, 3, start_time)     10000000000\n          value       0       (results, 3, value, 0)               3\nmod_iter = df.d_update_original_iter(data, verbose=True)\n[results][0][end_time]                                       Old value: 2021-01-21\n[results][0][end_time]                                       Updated value: 10000000000\n[results][0][start_time]                                     Old value: 2021-01-21\n[results][0][start_time]                                     Updated value: 10000000000\n[results][1][end_time]                                       Old value: 2021-01-21\n[results][1][end_time]                                       Updated value: 10000000000\n[results][1][start_time]                                     Old value: 2021-01-21\n[results][1][start_time]                                     Updated value: 10000000000\n[results][2][end_time]                                       Old value: 2021-01-21\n[results][2][end_time]                                       Updated value: 10000000000\n[results][2][start_time]                                     Old value: 2021-01-21\n[results][2][start_time]                                     Updated value: 10000000000\n[results][3][end_time]                                       Old value: 2021-01-21\n[results][3][end_time]                                       Updated value: 10000000000\n[results][3][start_time]                                     Old value: 2021-01-21\n[results][3][start_time]                                     Updated value: 10000000000\n{'results': [{'end_time': 10000000000,\n              'key': 'q1',\n              'result_type': 'multipleChoice',\n              'start_time': 10000000000,\n              'value': ['1']},\n             {'end_time': 10000000000,\n              'key': 'q2',\n              'result_type': 'multipleChoice',\n              'start_time': 10000000000,\n              'value': ['False']},\n             {'end_time': 10000000000,\n              'key': 'q3',\n              'result_type': 'multipleChoice',\n              'start_time': 10000000000,\n              'value': ['3']},\n             {'end_time': 10000000000,\n              'key': 'q4',\n              'result_type': 'multipleChoice',\n              'start_time': 10000000000,\n              'value': ['3']}]}\n```\n\n```python\n#Nested iterable from: \nhttps://stackoverflow.com/questions/66461902/flattening-nested-dictionary-into-dataframe-python\ndata=\n{1: {2: {'IDs': {'BookID': ['543533254353', '4324232342'],\n                 'SalesID': ['543267765345', '4353543'],\n                 'StoreID': ['111111', '1121111']},\n         'Name': 'boring Tales of Dragon Slayers'},\n     'IDs': {'BookID': ['543533254353'],\n             'SalesID': ['543267765345'],\n             'StoreID': ['123445452543']},\n     'Name': 'Thrilling Tales of Dragon Slayers'}}\ndf = pd.Q_AnyNestedIterable_2df(data,unstack=False)\n                                        aa_all_keys                           aa_value\n1 IDs  BookID  0       NaN      (1, IDs, BookID, 0)                       543533254353\n       SalesID 0       NaN     (1, IDs, SalesID, 0)                       543267765345\n       StoreID 0       NaN     (1, IDs, StoreID, 0)                       123445452543\n  Name NaN     NaN     NaN                (1, Name)  Thrilling Tales of Dragon Slayers\n  2    IDs     BookID  0     (1, 2, IDs, BookID, 0)                       543533254353\n                       1     (1, 2, IDs, BookID, 1)                         4324232342\n               SalesID 0    (1, 2, IDs, SalesID, 0)                       543267765345\n                       1    (1, 2, IDs, SalesID, 1)                            4353543\n               StoreID 0    (1, 2, IDs, StoreID, 0)                             111111\n                       1    (1, 2, IDs, StoreID, 1)                            1121111\n       Name    NaN     NaN             (1, 2, Name)     boring Tales of Dragon Slayers\ndf.loc[(df.d_filter_dtypes(allowed_dtypes=(str),fillvalue=pd.NA,column='aa_value').str.contains(r'^\\d+$',na=False) ), 'aa_value'] = df.loc[(df.d_filter_dtypes(allowed_dtypes=(str),fillvalue=pd.NA,column='aa_value').str.contains(r'^\\d+$',na=False) ), 'aa_value'].astype(float)\n                                        aa_all_keys                           aa_value\n1 IDs  BookID  0       NaN      (1, IDs, BookID, 0)                     543533254353.0\n       SalesID 0       NaN     (1, IDs, SalesID, 0)                     543267765345.0\n       StoreID 0       NaN     (1, IDs, StoreID, 0)                     123445452543.0\n  Name NaN     NaN     NaN                (1, Name)  Thrilling Tales of Dragon Slayers\n  2    IDs     BookID  0     (1, 2, IDs, BookID, 0)                     543533254353.0\n                       1     (1, 2, IDs, BookID, 1)                       4324232342.0\n               SalesID 0    (1, 2, IDs, SalesID, 0)                     543267765345.0\n                       1    (1, 2, IDs, SalesID, 1)                          4353543.0\n               StoreID 0    (1, 2, IDs, StoreID, 0)                           111111.0\n                       1    (1, 2, IDs, StoreID, 1)                          1121111.0\n       Name    NaN     NaN             (1, 2, Name)     boring Tales of Dragon Slayers\nmod_iter = df.d_update_original_iter(data, verbose=True)\n[1][2][IDs][BookID][0]                                       Old value: 543533254353\n[1][2][IDs][BookID][0]                                       Updated value: 543533254353.0\n[1][2][IDs][BookID][1]                                       Old value: 4324232342\n[1][2][IDs][BookID][1]                                       Updated value: 4324232342.0\n[1][2][IDs][SalesID][0]                                      Old value: 543267765345\n[1][2][IDs][SalesID][0]                                      Updated value: 543267765345.0\n[1][2][IDs][SalesID][1]                                      Old value: 4353543\n[1][2][IDs][SalesID][1]                                      Updated value: 4353543.0\n[1][2][IDs][StoreID][0]                                      Old value: 111111\n[1][2][IDs][StoreID][0]                                      Updated value: 111111.0\n[1][2][IDs][StoreID][1]                                      Old value: 1121111\n[1][2][IDs][StoreID][1]                                      Updated value: 1121111.0\n[1][IDs][BookID][0]                                          Old value: 543533254353\n[1][IDs][BookID][0]                                          Updated value: 543533254353.0\n[1][IDs][SalesID][0]                                         Old value: 543267765345\n[1][IDs][SalesID][0]                                         Updated value: 543267765345.0\n[1][IDs][StoreID][0]                                         Old value: 123445452543\n[1][IDs][StoreID][0]                                         Updated value: 123445452543.0\n{1: {2: {'IDs': {'BookID': [543533254353.0, 4324232342.0],\n                 'SalesID': [543267765345.0, 4353543.0],\n                 'StoreID': [111111.0, 1121111.0]},\n         'Name': 'boring Tales of Dragon Slayers'},\n     'IDs': {'BookID': [543533254353.0],\n             'SalesID': [543267765345.0],\n             'StoreID': [123445452543.0]},\n     'Name': 'Thrilling Tales of Dragon Slayers'}}\nNested iterable from: 'https://stackoverflow.com/questions/61984148/how-to-handle-nested-lists-and-dictionaries-in-pandas-dataframe'\n{'critic_reviews': [{'review_critic': 'XYZ', 'review_score': 90},\n                    {'review_critic': 'ABC', 'review_score': 90},\n                    {'review_critic': '123', 'review_score': 90}],\n 'genres': ['Sports', 'Golf'],\n 'score': 85,\n 'title': 'Golf Simulator',\n 'url': 'http://example.com/golf-simulator'}\ndf = pd.Q_AnyNestedIterable_2df(data,unstack=False)  # create DF stacked or unstacked, it doesn't matter\n                                                         aa_all_keys                           aa_value\ncritic_reviews 0   review_critic  (critic_reviews, 0, review_critic)                                XYZ\n                   review_score    (critic_reviews, 0, review_score)                                 90\n               1   review_critic  (critic_reviews, 1, review_critic)                                ABC\n                   review_score    (critic_reviews, 1, review_score)                                 90\n               2   review_critic  (critic_reviews, 2, review_critic)                                123\n                   review_score    (critic_reviews, 2, review_score)                                 90\ngenres         0   NaN                                   (genres, 0)                             Sports\n               1   NaN                                   (genres, 1)                               Golf\nscore          NaN NaN                                      (score,)                                 85\ntitle          NaN NaN                                      (title,)                     Golf Simulator\nurl            NaN NaN                                        (url,)  http://example.com/golf-simulator\ndf.loc[df.aa_value.str.contains('[Gg]',na=False),'aa_value'] = 'UPDATE1111' #df.loc to update the dataframe (VERY IMPORTANT: To update the original iterable you have to pass 'aa_value')\n                                                         aa_all_keys    aa_value\ncritic_reviews 0   review_critic  (critic_reviews, 0, review_critic)         XYZ\n                   review_score    (critic_reviews, 0, review_score)          90\n               1   review_critic  (critic_reviews, 1, review_critic)         ABC\n                   review_score    (critic_reviews, 1, review_score)          90\n               2   review_critic  (critic_reviews, 2, review_critic)         123\n                   review_score    (critic_reviews, 2, review_score)          90\ngenres         0   NaN                                   (genres, 0)      Sports\n               1   NaN                                   (genres, 1)  UPDATE1111\nscore          NaN NaN                                      (score,)          85\ntitle          NaN NaN                                      (title,)  UPDATE1111\nurl            NaN NaN                                        (url,)  UPDATE1111\nmod_iter = df.d_update_original_iter(data, verbose=True)  #updating the nested iterable, the new values have to be in the column 'aa_value', if you have added new columns to the dataframe, drop them before updating the original iterable\n[genres][1]                                                  Old value: Golf\n[genres][1]                                                  Updated value: UPDATE1111\n[title]                                                      Old value: Golf Simulator\n[title]                                                      Updated value: UPDATE1111\n[url]                                                        Old value: http://example.com/golf-simulator\n[url]                                                        Updated value: UPDATE1111\n{'critic_reviews': [{'review_critic': 'XYZ', 'review_score': 90},\n                    {'review_critic': 'ABC', 'review_score': 90},\n                    {'review_critic': '123', 'review_score': 90}],\n 'genres': ['Sports', 'UPDATE1111'],\n 'score': 85,\n 'title': 'UPDATE1111',\n 'url': 'UPDATE1111'}\n```\n\n```python\n#Nested iterable from: \nhttps://stackoverflow.com/questions/72990265/convert-nested-list-in-dictionary-to-dataframe/72990346\ndata=\n{'a': 'test',\n 'b': 1657,\n 'c': 'asset',\n 'd': [['2089', '0.0'], ['2088', '0.0']],\n 'e': [['2088', '0.0'], ['2088', '0.0'], ['2088', '0.00']],\n 'f': [['2088', '0.0', 'x', 'foo'],\n       ['2088', '0.0', 'bar', 'i'],\n       ['2088', '0.00', 'z', '0.2']],\n 'x': ['test1', 'test2']}\ndf = pd.Q_AnyNestedIterable_2df(data,unstack=False)\n          aa_all_keys aa_value\na NaN NaN        (a,)     test\nb NaN NaN        (b,)     1657\nc NaN NaN        (c,)    asset\nd 0   0     (d, 0, 0)     2089\n      1     (d, 0, 1)      0.0\n  1   0     (d, 1, 0)     2088\n      1     (d, 1, 1)      0.0\ne 0   0     (e, 0, 0)     2088\n      1     (e, 0, 1)      0.0\n  1   0     (e, 1, 0)     2088\n      1     (e, 1, 1)      0.0\n  2   0     (e, 2, 0)     2088\n      1     (e, 2, 1)     0.00\nf 0   0     (f, 0, 0)     2088\n      1     (f, 0, 1)      0.0\n      2     (f, 0, 2)        x\n      3     (f, 0, 3)      foo\n  1   0     (f, 1, 0)     2088\n      1     (f, 1, 1)      0.0\n      2     (f, 1, 2)      bar\n      3     (f, 1, 3)        i\n  2   0     (f, 2, 0)     2088\n      1     (f, 2, 1)     0.00\n      2     (f, 2, 2)        z\n      3     (f, 2, 3)      0.2\nx 0   NaN      (x, 0)    test1\n  1   NaN      (x, 1)    test2\ndf.loc[df.aa_value == 1657,'aa_value'] = 1657*30\n          aa_all_keys aa_value\na NaN NaN        (a,)     test\nb NaN NaN        (b,)    49710\nc NaN NaN        (c,)    asset\nd 0   0     (d, 0, 0)     2089\n      1     (d, 0, 1)      0.0\n  1   0     (d, 1, 0)     2088\n      1     (d, 1, 1)      0.0\ne 0   0     (e, 0, 0)     2088\n      1     (e, 0, 1)      0.0\n  1   0     (e, 1, 0)     2088\n      1     (e, 1, 1)      0.0\n  2   0     (e, 2, 0)     2088\n      1     (e, 2, 1)     0.00\nf 0   0     (f, 0, 0)     2088\n      1     (f, 0, 1)      0.0\n      2     (f, 0, 2)        x\n      3     (f, 0, 3)      foo\n  1   0     (f, 1, 0)     2088\n      1     (f, 1, 1)      0.0\n      2     (f, 1, 2)      bar\n      3     (f, 1, 3)        i\n  2   0     (f, 2, 0)     2088\n      1     (f, 2, 1)     0.00\n      2     (f, 2, 2)        z\n      3     (f, 2, 3)      0.2\nx 0   NaN      (x, 0)    test1\n  1   NaN      (x, 1)    test2\nmod_iter = df.d_update_original_iter(data, verbose=True)\n[b]                                                          Old value: 1657\n[b]                                                          Updated value: 49710\n{'a': 'test',\n 'b': 49710,\n 'c': 'asset',\n 'd': [['2089', '0.0'], ['2088', '0.0']],\n 'e': [['2088', '0.0'], ['2088', '0.0'], ['2088', '0.00']],\n 'f': [['2088', '0.0', 'x', 'foo'],\n       ['2088', '0.0', 'bar', 'i'],\n       ['2088', '0.00', 'z', '0.2']],\n 'x': ['test1', 'test2']}\n```\n\n```python\n#Nested iterable from: \nhttps://stackoverflow.com/questions/73430585/how-to-convert-a-list-of-nested-dictionaries-includes-tuples-as-a-dataframe\ndata=\n[{'cb': ({'ID': 1, 'Name': 'A', 'num': 50}, {'ID': 2, 'Name': 'A', 'num': 68}),\n  'final_value': 118},\n {'cb': ({'ID': 1, 'Name': 'A', 'num': 50}, {'ID': 4, 'Name': 'A', 'num': 67}),\n  'final_value': 117},\n {'cb': ({'ID': 1, 'Name': 'A', 'num': 50}, {'ID': 6, 'Name': 'A', 'num': 67}),\n  'final_value': 117}]\ndf = pd.Q_AnyNestedIterable_2df(data,unstack=False)\n                             aa_all_keys aa_value\n0 cb          0   ID      (0, cb, 0, ID)        1\n                  Name  (0, cb, 0, Name)        A\n                  num    (0, cb, 0, num)       50\n              1   ID      (0, cb, 1, ID)        2\n                  Name  (0, cb, 1, Name)        A\n                  num    (0, cb, 1, num)       68\n  final_value NaN NaN   (0, final_value)      118\n1 cb          0   ID      (1, cb, 0, ID)        1\n                  Name  (1, cb, 0, Name)        A\n                  num    (1, cb, 0, num)       50\n              1   ID      (1, cb, 1, ID)        4\n                  Name  (1, cb, 1, Name)        A\n                  num    (1, cb, 1, num)       67\n  final_value NaN NaN   (1, final_value)      117\n2 cb          0   ID      (2, cb, 0, ID)        1\n                  Name  (2, cb, 0, Name)        A\n                  num    (2, cb, 0, num)       50\n              1   ID      (2, cb, 1, ID)        6\n                  Name  (2, cb, 1, Name)        A\n                  num    (2, cb, 1, num)       67\n  final_value NaN NaN   (2, final_value)      117\ndf.d_filter_dtypes(allowed_dtypes=(int,float),fillvalue=pd.NA,column='aa_value') \u003e 30, 'aa_value'] = 900000\n                             aa_all_keys aa_value\n0 cb          0   ID      (0, cb, 0, ID)        1\n                  Name  (0, cb, 0, Name)        A\n                  num    (0, cb, 0, num)   900000\n              1   ID      (0, cb, 1, ID)        2\n                  Name  (0, cb, 1, Name)        A\n                  num    (0, cb, 1, num)   900000\n  final_value NaN NaN   (0, final_value)   900000\n1 cb          0   ID      (1, cb, 0, ID)        1\n                  Name  (1, cb, 0, Name)        A\n                  num    (1, cb, 0, num)   900000\n              1   ID      (1, cb, 1, ID)        4\n                  Name  (1, cb, 1, Name)        A\n                  num    (1, cb, 1, num)   900000\n  final_value NaN NaN   (1, final_value)   900000\n2 cb          0   ID      (2, cb, 0, ID)        1\n                  Name  (2, cb, 0, Name)        A\n                  num    (2, cb, 0, num)   900000\n              1   ID      (2, cb, 1, ID)        6\n                  Name  (2, cb, 1, Name)        A\n                  num    (2, cb, 1, num)   900000\n  final_value NaN NaN   (2, final_value)   900000\nmod_iter = df.d_update_original_iter(data, verbose=True)\n[0][cb][0][num]                                              Old value: 50\n[0][cb][0][num]                                              Updated value: 900000\n[0][cb][1][num]                                              Old value: 68\n[0][cb][1][num]                                              Updated value: 900000\n[0][final_value]                                             Old value: 118\n[0][final_value]                                             Updated value: 900000\n[1][cb][0][num]                                              Old value: 50\n[1][cb][0][num]                                              Updated value: 900000\n[1][cb][1][num]                                              Old value: 67\n[1][cb][1][num]                                              Updated value: 900000\n[1][final_value]                                             Old value: 117\n[1][final_value]                                             Updated value: 900000\n[2][cb][0][num]                                              Old value: 50\n[2][cb][0][num]                                              Updated value: 900000\n[2][cb][1][num]                                              Old value: 67\n[2][cb][1][num]                                              Updated value: 900000\n[2][final_value]                                             Old value: 117\n[2][final_value]                                             Updated value: 900000\n[{'cb': ({'ID': 1, 'Name': 'A', 'num': 900000},\n         {'ID': 2, 'Name': 'A', 'num': 900000}),\n  'final_value': 900000},\n {'cb': ({'ID': 1, 'Name': 'A', 'num': 900000},\n         {'ID': 4, 'Name': 'A', 'num': 900000}),\n  'final_value': 900000},\n {'cb': ({'ID': 1, 'Name': 'A', 'num': 900000},\n         {'ID': 6, 'Name': 'A', 'num': 900000}),\n  'final_value': 900000}]\n```\n\n```python\n#Nested iterable from: \nhttps://stackoverflow.com/questions/69943509/problems-when-flatten-a-dict\ndata=\n[{'application_contacts': [{'adress': 'X', 'email': 'test@test.com'}],\n  'application_details': {'email': None, 'phone': None},\n  'employer': {'Name': 'Nom', 'email': None},\n  'id': '1'},\n {'application_contacts': [{'adress': 'Z', 'email': None}],\n  'application_details': {'email': 'testy@test_a.com', 'phone': None},\n  'employer': {'Name': 'Nom', 'email': None},\n  'id': '2'},\n {'application_contacts': [{'adress': 'Y', 'email': None}],\n  'application_details': {'email': 'testy@test_a.com', 'phone': None},\n  'employer': {'Name': 'Nom', 'email': None},\n  'id': '3'}]\ndf = pd.Q_AnyNestedIterable_2df(data,unstack=False)\n                                                              aa_all_keys          aa_value\n0 application_contacts 0     adress  (0, application_contacts, 0, adress)                 X\n                             email    (0, application_contacts, 0, email)     test@test.com\n  application_details  email NaN          (0, application_details, email)              None\n                       phone NaN          (0, application_details, phone)              None\n  employer             Name  NaN                      (0, employer, Name)               Nom\n                       email NaN                     (0, employer, email)              None\n  id                   NaN   NaN                                  (0, id)                 1\n1 application_contacts 0     adress  (1, application_contacts, 0, adress)                 Z\n                             email    (1, application_contacts, 0, email)              None\n  application_details  email NaN          (1, application_details, email)  testy@test_a.com\n                       phone NaN          (1, application_details, phone)              None\n  employer             Name  NaN                      (1, employer, Name)               Nom\n                       email NaN                     (1, employer, email)              None\n  id                   NaN   NaN                                  (1, id)                 2\n2 application_contacts 0     adress  (2, application_contacts, 0, adress)                 Y\n                             email    (2, application_contacts, 0, email)              None\n  application_details  email NaN          (2, application_details, email)  testy@test_a.com\n                       phone NaN          (2, application_details, phone)              None\n  employer             Name  NaN                      (2, employer, Name)               Nom\n                       email NaN                     (2, employer, email)              None\n  id                   NaN   NaN                                  (2, id)                 3\ndf.loc[df.d_filter_dtypes(allowed_dtypes=(str),fillvalue=pd.NA,column='aa_value').str.contains(r'test_a\\.\\w+\\b',na=False), 'aa_value'] = 'UPPPPPPPPPPPPPPPDATE.COM'\n                                                              aa_all_keys                  aa_value\n0 application_contacts 0     adress  (0, application_contacts, 0, adress)                         X\n                             email    (0, application_contacts, 0, email)             test@test.com\n  application_details  email NaN          (0, application_details, email)                      None\n                       phone NaN          (0, application_details, phone)                      None\n  employer             Name  NaN                      (0, employer, Name)                       Nom\n                       email NaN                     (0, employer, email)                      None\n  id                   NaN   NaN                                  (0, id)                         1\n1 application_contacts 0     adress  (1, application_contacts, 0, adress)                         Z\n                             email    (1, application_contacts, 0, email)                      None\n  application_details  email NaN          (1, application_details, email)  UPPPPPPPPPPPPPPPDATE.COM\n                       phone NaN          (1, application_details, phone)                      None\n  employer             Name  NaN                      (1, employer, Name)                       Nom\n                       email NaN                     (1, employer, email)                      None\n  id                   NaN   NaN                                  (1, id)                         2\n2 application_contacts 0     adress  (2, application_contacts, 0, adress)                         Y\n                             email    (2, application_contacts, 0, email)                      None\n  application_details  email NaN          (2, application_details, email)  UPPPPPPPPPPPPPPPDATE.COM\n                       phone NaN          (2, application_details, phone)                      None\n  employer             Name  NaN                      (2, employer, Name)                       Nom\n                       email NaN                     (2, employer, email)                      None\n  id                   NaN   NaN                                  (2, id)                         3\nmod_iter = df.d_update_original_iter(data, verbose=True)\n[1][application_details][email]                              Old value: testy@test_a.com\n[1][application_details][email]                              Updated value: UPPPPPPPPPPPPPPPDATE.COM\n[2][application_details][email]                              Old value: testy@test_a.com\n[2][application_details][email]                              Updated value: UPPPPPPPPPPPPPPPDATE.COM\n[{'application_contacts': [{'adress': 'X', 'email': 'test@test.com'}],\n  'application_details': {'email': None, 'phone': None},\n  'employer': {'Name': 'Nom', 'email': None},\n  'id': '1'},\n {'application_contacts': [{'adress': 'Z', 'email': None}],\n  'application_details': {'email': 'UPPPPPPPPPPPPPPPDATE.COM', 'phone': None},\n  'employer': {'Name': 'Nom', 'email': None},\n  'id': '2'},\n {'application_contacts': [{'adress': 'Y', 'email': None}],\n  'application_details': {'email': 'UPPPPPPPPPPPPPPPDATE.COM', 'phone': None},\n  'employer': {'Name': 'Nom', 'email': None},\n  'id': '3'}]\n```\n\n```python\n#Nested iterable from: \nhttps://stackoverflow.com/questions/62765371/convert-nested-dataframe-to-a-simple-dataframeframe\ndata=\n{'A': [1, 2, 3],\n 'B': [4, 5, 6],\n 'departure': [{'actual': None,\n                'actual_runway': None,\n                'airport': 'Findel',\n                'delay': None,\n                'estimated': '2020-07-07T06:30:00+00:00',\n                'estimated_runway': None,\n                'gate': None,\n                'iata': 'LUX',\n                'icao': 'ELLX',\n                'scheduled': '2020-07-07T06:30:00+00:00',\n                'terminal': None,\n                'timezone': 'Europe/Luxembourg'},\n               {'actual': None,\n                'actual_runway': None,\n                'airport': 'Findel',\n                'delay': None,\n                'estimated': '2020-07-07T06:30:00+00:00',\n                'estimated_runway': None,\n                'gate': None,\n                'iata': 'LUX',\n                'icao': 'ELLX',\n                'scheduled': '2020-07-07T06:30:00+00:00',\n                'terminal': None,\n                'timezone': 'Europe/Luxembourg'},\n               {'actual': None,\n                'actual_runway': None,\n                'airport': 'Findel',\n                'delay': None,\n                'estimated': '2020-07-07T06:30:00+00:00',\n                'estimated_runway': None,\n                'gate': None,\n                'iata': 'LUX',\n                'icao': 'ELLX',\n                'scheduled': '2020-07-07T06:30:00+00:00',\n                'terminal': None,\n                'timezone': 'Europe/Luxembourg'}]}\ndf = pd.Q_AnyNestedIterable_2df(data,unstack=False)\n                                                   aa_all_keys                   aa_value\nA         0 NaN                                         (A, 0)                          1\n          1 NaN                                         (A, 1)                          2\n          2 NaN                                         (A, 2)                          3\nB         0 NaN                                         (B, 0)                          4\n          1 NaN                                         (B, 1)                          5\n          2 NaN                                         (B, 2)                          6\ndeparture 0 actual                      (departure, 0, actual)                       None\n            actual_runway        (departure, 0, actual_runway)                       None\n            airport                    (departure, 0, airport)                     Findel\n            delay                        (departure, 0, delay)                       None\n            estimated                (departure, 0, estimated)  2020-07-07T06:30:00+00:00\n            estimated_runway  (departure, 0, estimated_runway)                       None\n            gate                          (departure, 0, gate)                       None\n            iata                          (departure, 0, iata)                        LUX\n            icao                          (departure, 0, icao)                       ELLX\n            scheduled                (departure, 0, scheduled)  2020-07-07T06:30:00+00:00\n            terminal                  (departure, 0, terminal)                       None\n            timezone                  (departure, 0, timezone)          Europe/Luxembourg\n          1 actual                      (departure, 1, actual)                       None\n            actual_runway        (departure, 1, actual_runway)                       None\n            airport                    (departure, 1, airport)                     Findel\n            delay                        (departure, 1, delay)                       None\n            estimated                (departure, 1, estimated)  2020-07-07T06:30:00+00:00\n            estimated_runway  (departure, 1, estimated_runway)                       None\n            gate                          (departure, 1, gate)                       None\n            iata                          (departure, 1, iata)                        LUX\n            icao                          (departure, 1, icao)                       ELLX\n            scheduled                (departure, 1, scheduled)  2020-07-07T06:30:00+00:00\n            terminal                  (departure, 1, terminal)                       None\n            timezone                  (departure, 1, timezone)          Europe/Luxembourg\n          2 actual                      (departure, 2, actual)                       None\n            actual_runway        (departure, 2, actual_runway)                       None\n            airport                    (departure, 2, airport)                     Findel\n            delay                        (departure, 2, delay)                       None\n            estimated                (departure, 2, estimated)  2020-07-07T06:30:00+00:00\n            estimated_runway  (departure, 2, estimated_runway)                       None\n            gate                          (departure, 2, gate)                       None\n            iata                          (departure, 2, iata)                        LUX\n            icao                          (departure, 2, icao)                       ELLX\n            scheduled                (departure, 2, scheduled)  2020-07-07T06:30:00+00:00\n            terminal                  (departure, 2, terminal)                       None\n            timezone                  (departure, 2, timezone)          Europe/Luxembourg\ndf.loc[df.d_filter_dtypes(allowed_dtypes=(str),fillvalue=pd.NA,column='aa_value')== 'ELLX', 'aa_value'] = 'ELLX-UPDATED'\n                                                   aa_all_keys                   aa_value\nA         0 NaN                                         (A, 0)                          1\n          1 NaN                                         (A, 1)                          2\n          2 NaN                                         (A, 2)                          3\nB         0 NaN                                         (B, 0)                          4\n          1 NaN                                         (B, 1)                          5\n          2 NaN                                         (B, 2)                          6\ndeparture 0 actual                      (departure, 0, actual)                       None\n            actual_runway        (departure, 0, actual_runway)                       None\n            airport                    (departure, 0, airport)                     Findel\n            delay                        (departure, 0, delay)                       None\n            estimated                (departure, 0, estimated)  2020-07-07T06:30:00+00:00\n            estimated_runway  (departure, 0, estimated_runway)                       None\n            gate                          (departure, 0, gate)                       None\n            iata                          (departure, 0, iata)                        LUX\n            icao                          (departure, 0, icao)               ELLX-UPDATED\n            scheduled                (departure, 0, scheduled)  2020-07-07T06:30:00+00:00\n            terminal                  (departure, 0, terminal)                       None\n            timezone                  (departure, 0, timezone)          Europe/Luxembourg\n          1 actual                      (departure, 1, actual)                       None\n            actual_runway        (departure, 1, actual_runway)                       None\n            airport                    (departure, 1, airport)                     Findel\n            delay                        (departure, 1, delay)                       None\n            estimated                (departure, 1, estimated)  2020-07-07T06:30:00+00:00\n            estimated_runway  (departure, 1, estimated_runway)                       None\n            gate                          (departure, 1, gate)                       None\n            iata                          (departure, 1, iata)                        LUX\n            icao                          (departure, 1, icao)               ELLX-UPDATED\n            scheduled                (departure, 1, scheduled)  2020-07-07T06:30:00+00:00\n            terminal                  (departure, 1, terminal)                       None\n            timezone                  (departure, 1, timezone)          Europe/Luxembourg\n          2 actual                      (departure, 2, actual)                       None\n            actual_runway        (departure, 2, actual_runway)                       None\n            airport                    (departure, 2, airport)                     Findel\n            delay                        (departure, 2, delay)                       None\n            estimated                (departure, 2, estimated)  2020-07-07T06:30:00+00:00\n            estimated_runway  (departure, 2, estimated_runway)                       None\n            gate                          (departure, 2, gate)                       None\n            iata                          (departure, 2, iata)                        LUX\n            icao                          (departure, 2, icao)               ELLX-UPDATED\n            scheduled                (departure, 2, scheduled)  2020-07-07T06:30:00+00:00\n            terminal                  (departure, 2, terminal)                       None\n            timezone                  (departure, 2, timezone)          Europe/Luxembourg\nmod_iter = df.d_update_original_iter(data, verbose=True)\n[departure][0][icao]                                         Old value: ELLX\n[departure][0][icao]                                         Updated value: ELLX-UPDATED\n[departure][1][icao]                                         Old value: ELLX\n[departure][1][icao]                                         Updated value: ELLX-UPDATED\n[departure][2][icao]                                         Old value: ELLX\n[departure][2][icao]                                         Updated value: ELLX-UPDATED\n{'A': [1, 2, 3],\n 'B': [4, 5, 6],\n 'departure': [{'actual': None,\n                'actual_runway': None,\n                'airport': 'Findel',\n                'delay': None,\n                'estimated': '2020-07-07T06:30:00+00:00',\n                'estimated_runway': None,\n                'gate': None,\n                'iata': 'LUX',\n                'icao': 'ELLX-UPDATED',\n                'scheduled': '2020-07-07T06:30:00+00:00',\n                'terminal': None,\n                'timezone': 'Europe/Luxembourg'},\n               {'actual': None,\n                'actual_runway': None,\n                'airport': 'Findel',\n                'delay': None,\n                'estimated': '2020-07-07T06:30:00+00:00',\n                'estimated_runway': None,\n                'gate': None,\n                'iata': 'LUX',\n                'icao': 'ELLX-UPDATED',\n                'scheduled': '2020-07-07T06:30:00+00:00',\n                'terminal': None,\n                'timezone': 'Europe/Luxembourg'},\n               {'actual': None,\n                'actual_runway': None,\n                'airport': 'Findel',\n                'delay': None,\n                'estimated': '2020-07-07T06:30:00+00:00',\n                'estimated_runway': None,\n                'gate': None,\n                'iata': 'LUX',\n                'icao': 'ELLX-UPDATED',\n                'scheduled': '2020-07-07T06:30:00+00:00',\n                'terminal': None,\n                'timezone': 'Europe/Luxembourg'}]}\n```\n\n```python\n#Nested iterable from: \nhttps://stackoverflow.com/questions/64359762/constructing-a-pandas-dataframe-with-columns-and-sub-columns-from-nested-diction\ndata=\n{'level1': {'t1': {'s1': {'col1': 5, 'col2': 4, 'col3': 4, 'col4': 9},\n                   's2': {'col1': 1, 'col2': 5, 'col3': 4, 'col4': 8},\n                   's3': {'col1': 11, 'col2': 8, 'col3': 2, 'col4': 9},\n                   's4': {'col1': 5, 'col2': 4, 'col3': 4, 'col4': 9}},\n            't2': {'s1': {'col1': 5, 'col2': 4, 'col3': 4, 'col4': 9},\n                   's2': {'col1': 1, 'col2': 5, 'col3': 4, 'col4': 8},\n                   's3': {'col1': 11, 'col2': 8, 'col3': 2, 'col4': 9},\n                   's4': {'col1': 5, 'col2': 4, 'col3': 4, 'col4': 9}},\n            't3': {'s1': {'col1': 1, 'col2': 2, 'col3': 3, 'col4': 4},\n                   's2': {'col1': 5, 'col2': 6, 'col3': 7, 'col4': 8},\n                   's3': {'col1': 9, 'col2': 10, 'col3': 11, 'col4': 12},\n                   's4': {'col1': 13, 'col2': 14, 'col3': 15, 'col4': 16}}},\n 'level2': {'t1': {'s1': {'col1': 5, 'col2': 4, 'col3': 9, 'col4': 9},\n                   's2': {'col1': 1, 'col2': 5, 'col3': 4, 'col4': 5},\n                   's3': {'col1': 11, 'col2': 8, 'col3': 2, 'col4': 13},\n                   's4': {'col1': 5, 'col2': 4, 'col3': 4, 'col4': 20}},\n            't2': {'s1': {'col1': 5, 'col2': 4, 'col3': 4, 'col4': 9},\n                   's2': {'col1': 1, 'col2': 5, 'col3': 4, 'col4': 8},\n                   's3': {'col1': 11, 'col2': 8, 'col3': 2, 'col4': 9},\n                   's4': {'col1': 5, 'col2': 4, 'col3': 4, 'col4': 9}},\n            't3': {'s1': {'col1': 1, 'col2': 2, 'col3': 3, 'col4': 4},\n                   's2': {'col1': 5, 'col2': 6, 'col3': 7, 'col4': 8},\n                   's3': {'col1': 9, 'col2': 10, 'col3': 11, 'col4': 12},\n                   's4': {'col1': 13, 'col2': 14, 'col3': 15, 'col4': 16}}}}\ndf = pd.Q_AnyNestedIterable_2df(data,unstack=False)\n                              aa_all_keys  aa_value\nlevel1 t1 s1 col1  (level1, t1, s1, col1)         5\n             col2  (level1, t1, s1, col2)         4\n             col3  (level1, t1, s1, col3)         4\n             col4  (level1, t1, s1, col4)         9\n          s2 col1  (level1, t1, s2, col1)         1\n                                   ...       ...\nlevel2 t3 s3 col4  (level2, t3, s3, col4)        12\n          s4 col1  (level2, t3, s4, col1)        13\n             col2  (level2, t3, s4, col2)        14\n             col3  (level2, t3, s4, col3)        15\n             col4  (level2, t3, s4, col4)        16\n[96 rows x 2 columns]\ndf.loc[(df.d_filter_dtypes(allowed_dtypes=(int),fillvalue=pd.NA,column='aa_value') \u003e 5) \u0026 (df.d_filter_dtypes(allowed_dtypes=(int),fillvalue=pd.NA,column='aa_value') \u003c 10), 'aa_value'] = 1000000\n                              aa_all_keys  aa_value\nlevel1 t1 s1 col1  (level1, t1, s1, col1)         5\n             col2  (level1, t1, s1, col2)         4\n             col3  (level1, t1, s1, col3)         4\n             col4  (level1, t1, s1, col4)   1000000\n          s2 col1  (level1, t1, s2, col1)         1\n                                   ...       ...\nlevel2 t3 s3 col4  (level2, t3, s3, col4)        12\n          s4 col1  (level2, t3, s4, col1)        13\n             col2  (level2, t3, s4, col2)        14\n             col3  (level2, t3, s4, col3)        15\n             col4  (level2, t3, s4, col4)        16\n[96 rows x 2 columns]\nmod_iter = df.d_update_original_iter(data, verbose=True)\n[level1][t1][s1][col4]                                       Old value: 9\n[level1][t1][s1][col4]                                       Updated value: 1000000\n[level1][t1][s2][col4]                                       Old value: 8\n[level1][t1][s2][col4]                                       Updated value: 1000000\n[level1][t1][s3][col2]                                       Old value: 8\n[level1][t1][s3][col2]                                       Updated value: 1000000\n[level1][t1][s3][col4]                                       Old value: 9\n[level1][t1][s3][col4]                                       Updated value: 1000000\n[level1][t1][s4][col4]                                       Old value: 9\n[level1][t1][s4][col4]                                       Updated value: 1000000\n[level1][t2][s1][col4]                                       Old value: 9\n[level1][t2][s1][col4]                                       Updated value: 1000000\n[level1][t2][s2][col4]                                       Old value: 8\n[level1][t2][s2][col4]                                       Updated value: 1000000\n[level1][t2][s3][col2]                                       Old value: 8\n[level1][t2][s3][col2]                                       Updated value: 1000000\n[level1][t2][s3][col4]                                       Old value: 9\n[level1][t2][s3][col4]                                       Updated value: 1000000\n[level1][t2][s4][col4]                                       Old value: 9\n[level1][t2][s4][col4]                                       Updated value: 1000000\n[level1][t3][s2][col2]                                       Old value: 6\n[level1][t3][s2][col2]                                       Updated value: 1000000\n[level1][t3][s2][col3]                                       Old value: 7\n[level1][t3][s2][col3]                                       Updated value: 1000000\n[level1][t3][s2][col4]                                       Old value: 8\n[level1][t3][s2][col4]                                       Updated value: 1000000\n[level1][t3][s3][col1]                                       Old value: 9\n[level1][t3][s3][col1]                                       Updated value: 1000000\n[level2][t1][s1][col3]                                       Old value: 9\n[level2][t1][s1][col3]                                       Updated value: 1000000\n[level2][t1][s1][col4]                                       Old value: 9\n[level2][t1][s1][col4]                                       Updated value: 1000000\n[level2][t1][s3][col2]                                       Old value: 8\n[level2][t1][s3][col2]                                       Updated value: 1000000\n[level2][t2][s1][col4]                                       Old value: 9\n[level2][t2][s1][col4]                                       Updated value: 1000000\n[level2][t2][s2][col4]                                       Old value: 8\n[level2][t2][s2][col4]                                       Updated value: 1000000\n[level2][t2][s3][col2]                                       Old value: 8\n[level2][t2][s3][col2]                                       Updated value: 1000000\n[level2][t2][s3][col4]                                       Old value: 9\n[level2][t2][s3][col4]                                       Updated value: 1000000\n[level2][t2][s4][col4]                                       Old value: 9\n[level2][t2][s4][col4]                                       Updated value: 1000000\n[level2][t3][s2][col2]                                       Old value: 6\n[level2][t3][s2][col2]                                       Updated value: 1000000\n[level2][t3][s2][col3]                                       Old value: 7\n[level2][t3][s2][col3]                                       Updated value: 1000000\n[level2][t3][s2][col4]                                       Old value: 8\n[level2][t3][s2][col4]                                       Updated value: 1000000\n[level2][t3][s3][col1]                                       Old value: 9\n[level2][t3][s3][col1]                                       Updated value: 1000000\n{'level1': {'t1': {'s1': {'col1': 5, 'col2': 4, 'col3': 4, 'col4': 1000000},\n                   's2': {'col1': 1, 'col2': 5, 'col3': 4, 'col4': 1000000},\n                   's3': {'col1': 11,\n                          'col2': 1000000,\n                          'col3': 2,\n                          'col4': 1000000},\n                   's4': {'col1': 5, 'col2': 4, 'col3': 4, 'col4': 1000000}},\n            't2': {'s1': {'col1': 5, 'col2': 4, 'col3': 4, 'col4': 1000000},\n                   's2': {'col1': 1, 'col2': 5, 'col3': 4, 'col4': 1000000},\n                   's3': {'col1': 11,\n                          'col2': 1000000,\n                          'col3': 2,\n                          'col4': 1000000},\n                   's4': {'col1': 5, 'col2': 4, 'col3': 4, 'col4': 1000000}},\n            't3': {'s1': {'col1': 1, 'col2': 2, 'col3': 3, 'col4': 4},\n                   's2': {'col1': 5,\n                          'col2': 1000000,\n                          'col3': 1000000,\n                          'col4': 1000000},\n                   's3': {'col1': 1000000, 'col2': 10, 'col3': 11, 'col4': 12},\n                   's4': {'col1': 13, 'col2': 14, 'col3': 15, 'col4': 16}}},\n 'level2': {'t1': {'s1': {'col1': 5,\n                          'col2': 4,\n                          'col3': 1000000,\n                          'col4': 1000000},\n                   's2': {'col1': 1, 'col2': 5, 'col3': 4, 'col4': 5},\n                   's3': {'col1': 11, 'col2': 1000000, 'col3': 2, 'col4': 13},\n                   's4': {'col1': 5, 'col2': 4, 'col3': 4, 'col4': 20}},\n            't2': {'s1': {'col1': 5, 'col2': 4, 'col3': 4, 'col4': 1000000},\n                   's2': {'col1': 1, 'col2': 5, 'col3': 4, 'col4': 1000000},\n                   's3': {'col1': 11,\n                          'col2': 1000000,\n                          'col3': 2,\n                          'col4': 1000000},\n                   's4': {'col1': 5, 'col2': 4, 'col3': 4, 'col4': 1000000}},\n            't3': {'s1': {'col1': 1, 'col2': 2, 'col3': 3, 'col4': 4},\n                   's2': {'col1': 5,\n                          'col2': 1000000,\n                          'col3': 1000000,\n                          'col4': 1000000},\n                   's3': {'col1': 1000000, 'col2': 10, 'col3': 11, 'col4': 12},\n                   's4': {'col1': 13, 'col2': 14, 'col3': 15, 'col4': 16}}}}\n```\n\n```python\n#Nested iterable from: \nhttps://stackoverflow.com/questions/72146094/problems-matching-values-from-nested-dictionary\ndata=\n{'_links': {'next': None, 'prev': None},\n 'limit': 250,\n 'offset': 0,\n 'runs': [{'assignedto_id': None,\n           'blocked_count': 0,\n           'completed_on': None,\n           'config': None,\n           'config_ids': [],\n           'created_by': 1,\n           'created_on': 1651790693,\n           'custom_status1_count': 0,\n           'custom_status2_count': 0,\n           'custom_status3_count': 0,\n           'custom_status4_count': 0,\n           'custom_status5_count': 0,\n           'custom_status6_count': 0,\n           'custom_status7_count': 0,\n           'description': None,\n           'failed_count': 1,\n           'id': 13,\n           'include_all': False,\n           'is_completed': False,\n           'milestone_id': None,\n           'name': '2022-05-05-testrun',\n           'passed_count': 2,\n           'plan_id': None,\n           'project_id': 1,\n           'refs': None,\n           'retest_count': 0,\n           'suite_id': 1,\n           'untested_count': 0,\n           'updated_on': 1651790693,\n           'url': 'https://xxxxxxxxxx.testrail.io/index.php?/runs/view/13'},\n          {'assignedto_id': None,\n           'blocked_count': 0,\n           'completed_on': 1650989972,\n           'config': None,\n           'config_ids': [],\n           'created_by': 5,\n           'created_on': 1650966329,\n           'custom_status1_count': 0,\n           'custom_status2_count': 0,\n           'custom_status3_count': 0,\n           'custom_status4_count': 0,\n           'custom_status5_count': 0,\n           'custom_status6_count': 0,\n           'custom_status7_count': 0,\n           'description': None,\n           'failed_count': 0,\n           'id': 9,\n           'include_all': False,\n           'is_completed': True,\n           'milestone_id': None,\n           'name': 'This is a new test run',\n           'passed_count': 0,\n           'plan_id': None,\n           'project_id': 1,\n           'refs': None,\n           'retest_count': 0,\n           'suite_id': 1,\n           'untested_count': 3,\n           'updated_on': 1650966329,\n           'url': 'https://xxxxxxxxxx.testrail.io/index.php?/runs/view/9'}],\n 'size': 2}\ndf = pd.Q_AnyNestedIterable_2df(data,unstack=False)\n                                          aa_all_keys                                           aa_value\n_links next NaN                        (_links, next)                                               None\n       prev NaN                        (_links, prev)                                               None\nlimit  NaN  NaN                              (limit,)                                                250\noffset NaN  NaN                             (offset","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhansalemaos%2Fa_pandas_ex_plode_tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhansalemaos%2Fa_pandas_ex_plode_tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhansalemaos%2Fa_pandas_ex_plode_tool/lists"}