ModelFlowIb 2.68__tar.gz → 2.69__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. {modelflowib-2.68 → modelflowib-2.69}/ModelFlowIb.egg-info/PKG-INFO +1 -1
  2. {modelflowib-2.68 → modelflowib-2.69}/PKG-INFO +1 -1
  3. {modelflowib-2.68 → modelflowib-2.69}/modelmf.py +38 -38
  4. {modelflowib-2.68 → modelflowib-2.69}/pyproject.toml +1 -1
  5. {modelflowib-2.68 → modelflowib-2.69}/ModelFlowIb.egg-info/SOURCES.txt +0 -0
  6. {modelflowib-2.68 → modelflowib-2.69}/ModelFlowIb.egg-info/dependency_links.txt +0 -0
  7. {modelflowib-2.68 → modelflowib-2.69}/ModelFlowIb.egg-info/requires.txt +0 -0
  8. {modelflowib-2.68 → modelflowib-2.69}/ModelFlowIb.egg-info/top_level.txt +0 -0
  9. {modelflowib-2.68 → modelflowib-2.69}/modelBLfunk.py +0 -0
  10. {modelflowib-2.68 → modelflowib-2.69}/model_Excel.py +0 -0
  11. {modelflowib-2.68 → modelflowib-2.69}/model_cvx.py +0 -0
  12. {modelflowib-2.68 → modelflowib-2.69}/model_doable.py +0 -0
  13. {modelflowib-2.68 → modelflowib-2.69}/model_dynare.py +0 -0
  14. {modelflowib-2.68 → modelflowib-2.69}/model_financial_stability.py +0 -0
  15. {modelflowib-2.68 → modelflowib-2.69}/model_ifrs9.py +0 -0
  16. {modelflowib-2.68 → modelflowib-2.69}/model_latex.py +0 -0
  17. {modelflowib-2.68 → modelflowib-2.69}/model_latex_class.py +0 -0
  18. {modelflowib-2.68 → modelflowib-2.69}/model_run_numba.py +0 -0
  19. {modelflowib-2.68 → modelflowib-2.69}/modelclass.py +0 -0
  20. {modelflowib-2.68 → modelflowib-2.69}/modelclass2.py +0 -0
  21. {modelflowib-2.68 → modelflowib-2.69}/modelconstruct.py +0 -0
  22. {modelflowib-2.68 → modelflowib-2.69}/modeldash.py +0 -0
  23. {modelflowib-2.68 → modelflowib-2.69}/modeldashboot.py +0 -0
  24. {modelflowib-2.68 → modelflowib-2.69}/modeldashsidebar.py +0 -0
  25. {modelflowib-2.68 → modelflowib-2.69}/modeldekom.py +0 -0
  26. {modelflowib-2.68 → modelflowib-2.69}/modeldiff.py +0 -0
  27. {modelflowib-2.68 → modelflowib-2.69}/modeldisplay.py +0 -0
  28. {modelflowib-2.68 → modelflowib-2.69}/modelestimation.py +0 -0
  29. {modelflowib-2.68 → modelflowib-2.69}/modelfeedback.py +0 -0
  30. {modelflowib-2.68 → modelflowib-2.69}/modelgrab.py +0 -0
  31. {modelflowib-2.68 → modelflowib-2.69}/modelgrabwf2.py +0 -0
  32. {modelflowib-2.68 → modelflowib-2.69}/modelhelp.py +0 -0
  33. {modelflowib-2.68 → modelflowib-2.69}/modelinvert.py +0 -0
  34. {modelflowib-2.68 → modelflowib-2.69}/modeljupyter.py +0 -0
  35. {modelflowib-2.68 → modelflowib-2.69}/modeljupytermagic.py +0 -0
  36. {modelflowib-2.68 → modelflowib-2.69}/modelmacrograb.py +0 -0
  37. {modelflowib-2.68 → modelflowib-2.69}/modelmanipulation.py +0 -0
  38. {modelflowib-2.68 → modelflowib-2.69}/modelnet.py +0 -0
  39. {modelflowib-2.68 → modelflowib-2.69}/modelnewton.py +0 -0
  40. {modelflowib-2.68 → modelflowib-2.69}/modelnormalize.py +0 -0
  41. {modelflowib-2.68 → modelflowib-2.69}/modelpattern.py +0 -0
  42. {modelflowib-2.68 → modelflowib-2.69}/modelpatternrev.py +0 -0
  43. {modelflowib-2.68 → modelflowib-2.69}/modelreport.py +0 -0
  44. {modelflowib-2.68 → modelflowib-2.69}/modelsandbox.py +0 -0
  45. {modelflowib-2.68 → modelflowib-2.69}/modelsandbox_Mixin.py +0 -0
  46. {modelflowib-2.68 → modelflowib-2.69}/modeltodo.py +0 -0
  47. {modelflowib-2.68 → modelflowib-2.69}/modeluserfunk.py +0 -0
  48. {modelflowib-2.68 → modelflowib-2.69}/modeluserfunk_old.py +0 -0
  49. {modelflowib-2.68 → modelflowib-2.69}/modelvis.py +0 -0
  50. {modelflowib-2.68 → modelflowib-2.69}/modelwidget.py +0 -0
  51. {modelflowib-2.68 → modelflowib-2.69}/modelwidget_input.py +0 -0
  52. {modelflowib-2.68 → modelflowib-2.69}/modelwidget_input_old.py +0 -0
  53. {modelflowib-2.68 → modelflowib-2.69}/modelwidget_shinypy.py +0 -0
  54. {modelflowib-2.68 → modelflowib-2.69}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ModelFlowIb
3
- Version: 2.68
3
+ Version: 2.69
4
4
  Summary: A tool to solve and manage dynamic economic models
5
5
  Author-email: Ib Hansen <your@email.com>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ModelFlowIb
3
- Version: 2.68
3
+ Version: 2.69
4
4
  Summary: A tool to solve and manage dynamic economic models
5
5
  Author-email: Ib Hansen <your@email.com>
6
6
  License: MIT
@@ -230,48 +230,48 @@ if not hasattr(pd.DataFrame,'mf'):
230
230
  print('hello from ibloc')
231
231
  return
232
232
 
233
- def mfquery(pat, df):
234
- '''
235
- Returns a DataFrame with columns matching the pattern(s), case-insensitive.
236
- The pattern can be a string or a list of patterns.
237
- Wildcards: * and ?
238
-
239
- Args:
240
- pat (string or list of strings)
241
- df (DataFrame)
242
- Returns:
243
- DataFrame subset
244
- '''
245
- if isinstance(pat, list):
246
- patterns = pat
247
- else:
248
- patterns = [pat]
249
-
250
- # Lowercase lookup for case-insensitive matching
251
- col_map = {c.lower(): c for c in df.columns}
252
- lower_cols = list(col_map.keys())
253
-
254
- seen = set()
255
- names = []
256
-
257
- for p in patterns:
258
- for up in p.lower().split():
259
- for v in fnmatch.filter(lower_cols, up):
260
- orig = col_map[v]
261
- if orig not in seen:
262
- seen.add(orig)
263
- names.append(orig)
264
-
265
- return df.loc[:, names]
266
-
267
-
233
+ def mfquery_0(pat, df):
234
+ '''
235
+ Returns a DataFrame with columns matching the pattern(s), case-insensitive.
236
+ The pattern can be a string or a list of patterns.
237
+ Wildcards: * and ?
238
+
239
+ Args:
240
+ pat (string or list of strings)
241
+ df (DataFrame)
242
+ Returns:
243
+ DataFrame subset
244
+ '''
245
+ if isinstance(pat, list):
246
+ patterns = pat
247
+ else:
248
+ patterns = [pat]
249
+
250
+ # Lowercase lookup for case-insensitive matching
251
+ col_map = {str(c) .lower(): c for c in df.columns}
252
+ lower_cols = list(col_map.keys())
253
+
254
+ seen = set()
255
+ names = []
256
+
257
+ for p in patterns:
258
+ for up in p.lower().split():
259
+ for v in fnmatch.filter(lower_cols, up):
260
+ orig = col_map[v]
261
+ if orig not in seen:
262
+ seen.add(orig)
263
+ names.append(orig)
264
+
265
+ return df.loc[:, names]
266
+
267
+
268
268
  @pd.api.extensions.register_dataframe_accessor("mfquery")
269
- class DFQueryAccessor:
269
+ class mfquery:
270
270
  def __init__(self, pandas_obj):
271
271
  self._obj = pandas_obj
272
-
272
+
273
273
  def __call__(self, pat):
274
- return mfquery(pat, self._obj)
274
+ return mfquery_0(pat, self._obj)
275
275
 
276
276
 
277
277
  def f(a):
@@ -7,7 +7,7 @@ where = ["."]
7
7
 
8
8
  [project]
9
9
  name = "ModelFlowIb"
10
- version = "2.68"
10
+ version = "2.69"
11
11
  description = "A tool to solve and manage dynamic economic models"
12
12
  authors = [{name = "Ib Hansen", email = "your@email.com"}]
13
13
  license = { text = "MIT" }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes