KL-Py 0.3.2__tar.gz → 0.3.3__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 (268) hide show
  1. {kl_py-0.3.2 → kl_py-0.3.3}/PKG-INFO +1 -1
  2. {kl_py-0.3.2 → kl_py-0.3.3}/pyproject.toml +1 -1
  3. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/_custom_pandas.py +361 -34
  4. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/_custom_sqlite.py +29 -13
  5. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/_translate.py +51 -6
  6. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py.egg-info/PKG-INFO +1 -1
  7. {kl_py-0.3.2 → kl_py-0.3.3}/LICENSE +0 -0
  8. {kl_py-0.3.2 → kl_py-0.3.3}/README.md +0 -0
  9. {kl_py-0.3.2 → kl_py-0.3.3}/setup.cfg +0 -0
  10. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/__init__.py +0 -0
  11. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/_utils.py +0 -0
  12. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/__init__.py +0 -0
  13. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/base.py +0 -0
  14. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/button.py +0 -0
  15. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/calendar.py +0 -0
  16. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/canvas.py +0 -0
  17. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/checkbox.py +0 -0
  18. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/column.py +0 -0
  19. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/combo.py +0 -0
  20. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/error.py +0 -0
  21. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/frame.py +0 -0
  22. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/graph.py +0 -0
  23. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/helpers.py +0 -0
  24. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/image.py +0 -0
  25. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/input.py +0 -0
  26. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/list_box.py +0 -0
  27. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/menu.py +0 -0
  28. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/multiline.py +0 -0
  29. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/option_menu.py +0 -0
  30. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/pane.py +0 -0
  31. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/progress_bar.py +0 -0
  32. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/radio.py +0 -0
  33. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/separator.py +0 -0
  34. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/sizegrip.py +0 -0
  35. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/slider.py +0 -0
  36. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/spin.py +0 -0
  37. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/status_bar.py +0 -0
  38. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/stretch.py +0 -0
  39. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/tab.py +0 -0
  40. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/table.py +0 -0
  41. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/text.py +0 -0
  42. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/elements/tree.py +0 -0
  43. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/themes.py +0 -0
  44. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/tray.py +0 -0
  45. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/FreeSimpleGUI/window.py +0 -0
  46. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/KL_Py.py +0 -0
  47. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/__init__.py +0 -0
  48. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/_custom_turtle.py +0 -0
  49. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/_error_classes.py +0 -0
  50. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/_klang_builtins.py +0 -0
  51. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/automl.py +0 -0
  52. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/dnd/__init__.py +0 -0
  53. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/drag_and_drop/__init__.py +0 -0
  54. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/export/__init__.py +0 -0
  55. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/export/__main__.py +0 -0
  56. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/export/config.py +0 -0
  57. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/export/dialogs.py +0 -0
  58. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/export/packaging.py +0 -0
  59. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/export/shims.py +0 -0
  60. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/export/ui.py +0 -0
  61. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/export/utils.py +0 -0
  62. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/export/validation.py +0 -0
  63. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/fsgdnd/__init__.py +0 -0
  64. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/fsgui/__init__.py +0 -0
  65. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/__init__.py +0 -0
  66. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/_utils.py +0 -0
  67. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/base.py +0 -0
  68. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/button.py +0 -0
  69. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/calendar.py +0 -0
  70. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/canvas.py +0 -0
  71. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/center.py +0 -0
  72. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/checkbox.py +0 -0
  73. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/column.py +0 -0
  74. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/combo.py +0 -0
  75. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/error.py +0 -0
  76. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/frame.py +0 -0
  77. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/graph.py +0 -0
  78. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/helpers.py +0 -0
  79. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/image.py +0 -0
  80. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/input.py +0 -0
  81. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/list_box.py +0 -0
  82. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/menu.py +0 -0
  83. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/multiline.py +0 -0
  84. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/option_menu.py +0 -0
  85. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/pane.py +0 -0
  86. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/progress_bar.py +0 -0
  87. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/radio.py +0 -0
  88. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/separator.py +0 -0
  89. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/sizegrip.py +0 -0
  90. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/slider.py +0 -0
  91. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/spin.py +0 -0
  92. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/status_bar.py +0 -0
  93. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/stretch.py +0 -0
  94. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/tab.py +0 -0
  95. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/table.py +0 -0
  96. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/text.py +0 -0
  97. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/elements/tree.py +0 -0
  98. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/replace.py +0 -0
  99. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/tray.py +0 -0
  100. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/hindGui/window.py +0 -0
  101. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/k2exe/__init__.py +0 -0
  102. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/k2exe/__main__.py +0 -0
  103. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/k2exe/config.py +0 -0
  104. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/k2exe/dialogs.py +0 -0
  105. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/k2exe/packaging.py +0 -0
  106. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/k2exe/shims.py +0 -0
  107. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/k2exe/ui.py +0 -0
  108. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/k2exe/utils.py +0 -0
  109. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/k2exe/validation.py +0 -0
  110. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/kexe/__init__.py +0 -0
  111. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/kexe/__main__.py +0 -0
  112. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/kexe/config.py +0 -0
  113. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/kexe/dialogs.py +0 -0
  114. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/kexe/packaging.py +0 -0
  115. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/kexe/shims.py +0 -0
  116. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/kexe/ui.py +0 -0
  117. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/kexe/utils.py +0 -0
  118. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/kexe/validation.py +0 -0
  119. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/kl2exe/__init__.py +0 -0
  120. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/kl2exe/__main__.py +0 -0
  121. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/kl2exe/config.py +0 -0
  122. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/kl2exe/dialogs.py +0 -0
  123. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/kl2exe/packaging.py +0 -0
  124. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/kl2exe/shims.py +0 -0
  125. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/kl2exe/ui.py +0 -0
  126. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/kl2exe/utils.py +0 -0
  127. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/kl2exe/validation.py +0 -0
  128. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/klang2exe/__init__.py +0 -0
  129. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/klang2exe/__main__.py +0 -0
  130. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/klang2exe/config.py +0 -0
  131. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/klang2exe/dialogs.py +0 -0
  132. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/klang2exe/packaging.py +0 -0
  133. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/klang2exe/shims.py +0 -0
  134. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/klang2exe/ui.py +0 -0
  135. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/klang2exe/utils.py +0 -0
  136. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/klang2exe/validation.py +0 -0
  137. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/klangexe/__init__.py +0 -0
  138. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/klangexe/__main__.py +0 -0
  139. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/klangexe/config.py +0 -0
  140. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/klangexe/dialogs.py +0 -0
  141. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/klangexe/packaging.py +0 -0
  142. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/klangexe/shims.py +0 -0
  143. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/klangexe/ui.py +0 -0
  144. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/klangexe/utils.py +0 -0
  145. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/klangexe/validation.py +0 -0
  146. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/klexe/__init__.py +0 -0
  147. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/klexe/__main__.py +0 -0
  148. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/klexe/config.py +0 -0
  149. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/klexe/dialogs.py +0 -0
  150. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/klexe/packaging.py +0 -0
  151. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/klexe/shims.py +0 -0
  152. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/klexe/ui.py +0 -0
  153. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/klexe/utils.py +0 -0
  154. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/klexe/validation.py +0 -0
  155. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/ml.py +0 -0
  156. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/np/__init__.py +0 -0
  157. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/pd/__init__.py +0 -0
  158. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/plt/__init__.py +0 -0
  159. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/psgui/__init__.py +0 -0
  160. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/px/__init__.py +0 -0
  161. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/pyexe/__init__.py +0 -0
  162. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/pyexe/__main__.py +0 -0
  163. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/pyexe/config.py +0 -0
  164. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/pyexe/dialogs.py +0 -0
  165. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/pyexe/packaging.py +0 -0
  166. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/pyexe/shims.py +0 -0
  167. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/pyexe/ui.py +0 -0
  168. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/pyexe/utils.py +0 -0
  169. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/pyexe/validation.py +0 -0
  170. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/pysgdnd/__init__.py +0 -0
  171. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/__init__.py +0 -0
  172. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/__version__.py +0 -0
  173. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/_internal_utils.py +0 -0
  174. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/adapters.py +0 -0
  175. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/api.py +0 -0
  176. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/auth.py +0 -0
  177. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/certifi/__init__.py +0 -0
  178. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/certifi/__main__.py +0 -0
  179. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/certifi/core.py +0 -0
  180. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/certifi/py.typed +0 -0
  181. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/certs.py +0 -0
  182. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/charset_normalizer/__init__.py +0 -0
  183. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/charset_normalizer/__main__.py +0 -0
  184. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/charset_normalizer/api.py +0 -0
  185. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/charset_normalizer/cd.py +0 -0
  186. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/charset_normalizer/cli/__init__.py +0 -0
  187. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/charset_normalizer/cli/__main__.py +0 -0
  188. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/charset_normalizer/constant.py +0 -0
  189. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/charset_normalizer/legacy.py +0 -0
  190. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/charset_normalizer/md.py +0 -0
  191. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/charset_normalizer/models.py +0 -0
  192. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/charset_normalizer/py.typed +0 -0
  193. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/charset_normalizer/utils.py +0 -0
  194. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/charset_normalizer/version.py +0 -0
  195. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/compat.py +0 -0
  196. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/cookies.py +0 -0
  197. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/exceptions.py +0 -0
  198. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/help.py +0 -0
  199. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/hooks.py +0 -0
  200. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/idna/__init__.py +0 -0
  201. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/idna/codec.py +0 -0
  202. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/idna/compat.py +0 -0
  203. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/idna/core.py +0 -0
  204. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/idna/idnadata.py +0 -0
  205. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/idna/intranges.py +0 -0
  206. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/idna/package_data.py +0 -0
  207. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/idna/py.typed +0 -0
  208. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/idna/uts46data.py +0 -0
  209. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/models.py +0 -0
  210. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/packages.py +0 -0
  211. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/sessions.py +0 -0
  212. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/status_codes.py +0 -0
  213. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/structures.py +0 -0
  214. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/__init__.py +0 -0
  215. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/_base_connection.py +0 -0
  216. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/_collections.py +0 -0
  217. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/_request_methods.py +0 -0
  218. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/_version.py +0 -0
  219. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/connection.py +0 -0
  220. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/connectionpool.py +0 -0
  221. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/contrib/__init__.py +0 -0
  222. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/contrib/emscripten/__init__.py +0 -0
  223. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/contrib/emscripten/connection.py +0 -0
  224. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/contrib/emscripten/fetch.py +0 -0
  225. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/contrib/emscripten/request.py +0 -0
  226. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/contrib/emscripten/response.py +0 -0
  227. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/contrib/pyopenssl.py +0 -0
  228. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/contrib/socks.py +0 -0
  229. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/exceptions.py +0 -0
  230. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/fields.py +0 -0
  231. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/filepost.py +0 -0
  232. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/http2/__init__.py +0 -0
  233. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/http2/connection.py +0 -0
  234. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/http2/probe.py +0 -0
  235. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/poolmanager.py +0 -0
  236. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/py.typed +0 -0
  237. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/response.py +0 -0
  238. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/util/__init__.py +0 -0
  239. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/util/connection.py +0 -0
  240. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/util/proxy.py +0 -0
  241. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/util/request.py +0 -0
  242. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/util/response.py +0 -0
  243. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/util/retry.py +0 -0
  244. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/util/ssl_.py +0 -0
  245. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/util/ssl_match_hostname.py +0 -0
  246. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/util/ssltransport.py +0 -0
  247. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/util/timeout.py +0 -0
  248. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/util/url.py +0 -0
  249. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/util/util.py +0 -0
  250. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/urllib3/util/wait.py +0 -0
  251. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/requests/utils.py +0 -0
  252. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/sb/__init__.py +0 -0
  253. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/sk/__init__.py +0 -0
  254. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/sns/__init__.py +0 -0
  255. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/toexe/__init__.py +0 -0
  256. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/toexe/__main__.py +0 -0
  257. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/toexe/config.py +0 -0
  258. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/toexe/dialogs.py +0 -0
  259. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/toexe/packaging.py +0 -0
  260. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/toexe/shims.py +0 -0
  261. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/toexe/ui.py +0 -0
  262. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/toexe/utils.py +0 -0
  263. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/toexe/validation.py +0 -0
  264. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py/when.py +0 -0
  265. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py.egg-info/SOURCES.txt +0 -0
  266. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py.egg-info/dependency_links.txt +0 -0
  267. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py.egg-info/requires.txt +0 -0
  268. {kl_py-0.3.2 → kl_py-0.3.3}/src/KL_Py.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: KL_Py
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: A Python simplification module
5
5
  Author-email: Abbaskhurram255 <abbaskhurram255@gmail.com>
6
6
  Classifier: Programming Language :: Python :: 3
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
 
6
6
  [project]
7
7
  name = "KL_Py"
8
- version = "0.3.2"
8
+ version = "0.3.3"
9
9
  authors = [
10
10
  { name = "Abbaskhurram255", email = "abbaskhurram255@gmail.com" }
11
11
  ]
@@ -21,6 +21,8 @@ try:
21
21
  ROW, COLUMN = 0, 1
22
22
  pd.ROW = ROW
23
23
  pd.COLUMN = COLUMN
24
+ __old_ohe__ = pd.get_dummies
25
+ __old_rcsv__ = pd.read_csv
24
26
  class CustomSeries(pd.Series):
25
27
  @property
26
28
  def _constructor(self):
@@ -64,8 +66,9 @@ try:
64
66
  if name.startswith('_') or name in self.__dict__:
65
67
  return super().__getattribute__(name)
66
68
  cf_name = name.casefold()
67
- if cf_name in self.index:
68
- return self[cf_name]
69
+ if hasattr(self, 'index')\
70
+ and cf_name in self.index:
71
+ return self[cf_name]
69
72
  try:
70
73
  return super().__getattribute__(name)
71
74
  except AttributeError:
@@ -77,8 +80,9 @@ try:
77
80
  super().__setattr__(name, value)
78
81
  return
79
82
  cf_name = name.casefold()
80
- if hasattr(self, 'index') and cf_name in self.index:
81
- self[cf_name] = value
83
+ if hasattr(self, 'index')\
84
+ and cf_name in self.index:
85
+ self[cf_name] = value
82
86
  else:
83
87
  super().__setattr__(name, value)
84
88
  bharona = bharo_na = bharonull = bharo_null = pd.Series.fillna
@@ -111,18 +115,25 @@ try:
111
115
  else:
112
116
  new_columns = [x.casefold() if isinstance(x, str) else x for x in new_columns]
113
117
  super(CustomDataFrame, type(self)).columns.__set__(self, new_columns)
114
- def __init__(self, data=None, index=None, columns=None, *args, **kwargs) -> None:
115
- if isinstance(data, dict):
116
- data = {_safe_casefold(k): v for k, v in data.items() if not callable(v)}
117
- elif type(data) in (pd.DataFrame, CustomDataFrame):
118
- index = data.index if index is None else index
119
- columns = data.columns if columns is None else columns
120
- data = data.values
121
- super().__init__(data, index, columns, *args, **kwargs)
122
- if self.columns.map(lambda x: isinstance(x, str)).any():
123
- self.columns = self.columns.map(lambda x: x.casefold() if isinstance(x, str) else x)
124
- if self.index.map(lambda x: isinstance(x, str)).any():
125
- self.index = self.index.map(lambda x: x.casefold() if isinstance(x, str) else x)
118
+ def __init__(
119
+ self,
120
+ data=None,
121
+ index=None,
122
+ columns=None,
123
+ *args,
124
+ **kwargs
125
+ ) -> None:
126
+ if isinstance(data, dict):
127
+ data = {_safe_casefold(k): v for k, v in data.items() if not callable(v)}
128
+ elif type(data) in (pd.DataFrame, CustomDataFrame):
129
+ index = data.index if index is None else index
130
+ columns = data.columns if columns is None else columns
131
+ data = data.values
132
+ super().__init__(data, index, columns, *args, **kwargs)
133
+ if self.columns.map(lambda x: isinstance(x, str)).any():
134
+ self.columns = self.columns.map(lambda x: x.casefold() if isinstance(x, str) else x)
135
+ if self.index.map(lambda x: isinstance(x, str)).any():
136
+ self.index = self.index.map(lambda x: x.casefold() if isinstance(x, str) else x)
126
137
  __old_df_query__ = pd.DataFrame.query
127
138
  def select(self, x: str|list[str], *args, **kwargs) -> None:
128
139
  if isinstance(x, list) and all(isinstance(sub_item, str) for sub_item in x):
@@ -199,8 +210,9 @@ try:
199
210
  if name.startswith('_') or name in self.__dict__:
200
211
  return super().__getattribute__(name)
201
212
  cf_name = name.casefold()
202
- if cf_name in self.columns:
203
- return self[cf_name]
213
+ if hasattr(self, 'columns')\
214
+ and cf_name in self.columns:
215
+ return self[cf_name]
204
216
  try:
205
217
  return super().__getattribute__(name)
206
218
  except AttributeError:
@@ -212,15 +224,20 @@ try:
212
224
  super().__setattr__(name, value)
213
225
  return
214
226
  cf_name = name.casefold()
215
- if hasattr(self, 'columns') and cf_name in self.columns:
216
- self[cf_name] = value
227
+ if hasattr(self, 'columns')\
228
+ and cf_name in self.columns:
229
+ self[cf_name] = value
217
230
  else:
218
231
  super().__setattr__(name, value)
219
- def __call__(self, item=None):
220
- if item is not None:
221
- return self[item]
232
+ def __call__(self, *items, **kwargs):
233
+ if items:
234
+ if len(items) == 1:
235
+ item = items[0]
236
+ return self[item]
237
+ return self[*items]
222
238
  self.quick_clean(
223
- inplace=True
239
+ inplace=True,
240
+ **kwargs
224
241
  )
225
242
  return self
226
243
  def girao(self, labels: list[str] | None = None, *args, **kwargs):
@@ -250,6 +267,7 @@ try:
250
267
  def quick_clean(
251
268
  self,
252
269
  rows: bool = True,
270
+ index: bool = True,
253
271
  inplace: bool = True
254
272
  ) -> pd.DataFrame:
255
273
  df_copy: pd.DataFrame = self.copy()
@@ -258,7 +276,7 @@ try:
258
276
  r"\W",
259
277
  "",
260
278
  re.sub(
261
- r"\s{2,}",
279
+ r"\s+",
262
280
  " ",
263
281
  str(c).strip("_ ")
264
282
  ).replace(" ", "_")
@@ -266,28 +284,335 @@ try:
266
284
  df_copy = df_copy.rename(
267
285
  columns=minimal_column_cleaner
268
286
  )
287
+ # for columns ^
288
+ if index:
289
+ df_copy.index = df_copy.index.map(
290
+ minimal_column_cleaner
291
+ )
292
+ # for indices ^
269
293
  if rows:
270
- minimal_row_cleaner = lambda x:\
294
+ minimal_row_cleaner = lambda value:\
271
295
  re.sub(
272
296
  r"^[^\-\.A-Za-z\d]+|[^\-\.A-Za-z\d]+$",
273
297
  "",
274
298
  re.sub(
275
- r"\s{2,}",
299
+ r"\s+",
276
300
  " ",
277
- x.strip("_ ")
301
+ value.strip("_ ")
278
302
  )
279
303
  ).strip("_ ")\
280
- if isinstance(x, str) else x
304
+ if isinstance(value, str)\
305
+ else value
281
306
  df_copy = df_copy.map(
282
307
  minimal_row_cleaner
283
308
  )
309
+ # for rows ^
284
310
  if inplace:
285
311
  self.__init__(
286
312
  df_copy
287
313
  )
288
314
  return df_copy
289
- pd.DataFrame.quick_clean = pd.DataFrame.qc = qc = quick_clean
290
- pd.DF = KlDF = KDF = KlangDF = KlangDataFrame = SuperDF = SuperDataFrame = CustomDF = CustomDataFrame
315
+ pd.DataFrame.quick_clean =\
316
+ pd.DataFrame.qc =\
317
+ qc =\
318
+ quick_clean
319
+ @classmethod
320
+ def rcsv(cls, filepath_or_buffer, *args, **kwargs):
321
+ if isinstance(
322
+ filepath_or_buffer,
323
+ str
324
+ )\
325
+ and not filepath_or_buffer\
326
+ .strip()\
327
+ .lower()\
328
+ .endswith(".csv"):
329
+ filepath_or_buffer += ".csv"
330
+ return cls(
331
+ __old_rcsv__(
332
+ filepath_or_buffer=filepath_or_buffer,
333
+ *args,
334
+ **kwargs
335
+ )
336
+ )
337
+ read_csv =\
338
+ parho_csv =\
339
+ pd.rcsv =\
340
+ pd.read_csv =\
341
+ pd.parho_csv =\
342
+ rcsv
343
+ make_dummies =\
344
+ get_dummies =\
345
+ make_ohe =\
346
+ ohe =\
347
+ one_hot_encoding =\
348
+ make_one_hot_encoding =\
349
+ pd.make_dummies =\
350
+ pd.make_ohe =\
351
+ pd.make_one_hot_encoding =\
352
+ pd.one_hot_encoding =\
353
+ pd.ohe =\
354
+ lambda self, *args, **kwargs:\
355
+ CustomDataFrame(
356
+ __old_ohe__(
357
+ pd.DataFrame(
358
+ self
359
+ ),
360
+ *args,
361
+ **kwargs
362
+ )
363
+ )
364
+ def remove_ohe(
365
+ self,
366
+ prefix: str = None,
367
+ col: str = None
368
+ ) -> "CustomDataFrame":
369
+ df_copy = self.copy()
370
+ if not isinstance(prefix, str):
371
+ prefix = ""
372
+ if not isinstance(col, str):
373
+ col = ""
374
+ prefix_cf = prefix\
375
+ .strip()\
376
+ .casefold()
377
+ col = col.strip()
378
+ if not prefix_cf\
379
+ and col:
380
+ prefix_cf = col
381
+ col = ""
382
+ if prefix_cf\
383
+ and not prefix_cf.endswith(
384
+ "_"
385
+ ):
386
+ prefix_cf += "_"
387
+ if not prefix_cf:
388
+ print("A prefix is needed")
389
+ return self
390
+ if not col\
391
+ and re.search(
392
+ r"(?<=.)_$",
393
+ re.escape(
394
+ prefix_cf
395
+ )
396
+ ):
397
+ col = prefix_cf.rsplit(
398
+ "_",
399
+ 1
400
+ )[0]
401
+ ohe_cols = [
402
+ col\
403
+ for col in df_copy\
404
+ .columns\
405
+ if str(col)\
406
+ .lower()\
407
+ .startswith(
408
+ prefix_cf
409
+ )
410
+ ]
411
+ if not ohe_cols:
412
+ print(
413
+ f"WARNING: "\
414
+ + f"No columns found matching prefix '{prefix_cf}'"
415
+ )
416
+ return self
417
+ if not col:
418
+ print("A col(umn) is needed")
419
+ return self
420
+ restored_series = df_copy[
421
+ ohe_cols
422
+ ].idxmax(
423
+ axis=1
424
+ ).apply(
425
+ lambda x: str(x)[
426
+ len(prefix_cf):
427
+ ]\
428
+ if pd.notna(x)\
429
+ else None
430
+ )
431
+ df_copy[
432
+ col.strip().casefold()
433
+ ] = restored_series
434
+ return CustomDataFrame(
435
+ df_copy.drop(
436
+ columns=ohe_cols
437
+ )
438
+ )
439
+ drop_ohe =\
440
+ clear_ohe =\
441
+ drop_one_hot_encoding =\
442
+ clear_one_hot_encoding =\
443
+ remove_one_hot_encoding =\
444
+ pd.drop_ohe =\
445
+ pd.clear_ohe =\
446
+ pd.drop_one_hot_encoding =\
447
+ pd.clear_one_hot_encoding =\
448
+ pd.remove_one_hot_encoding =\
449
+ remove_ohe
450
+ def mhe(
451
+ self,
452
+ col: str,
453
+ sep: str = "|",
454
+ min_freq: int = 0
455
+ ) -> "CustomDataFrame":
456
+ if not isinstance(col, str):
457
+ col = ""
458
+ col = col\
459
+ .strip()\
460
+ .lower()
461
+ if not isinstance(sep, str):
462
+ sep = ""
463
+ if not sep.strip():
464
+ sep = "|"
465
+ if isinstance(min_freq, float):
466
+ min_freq = int(
467
+ round(
468
+ min_freq,
469
+ 0
470
+ )
471
+ )
472
+ if not isinstance(min_freq, int):
473
+ min_freq = 0
474
+ if col not in self.columns:
475
+ raise KeyError(
476
+ f"Column '{col}' does not exist in CustomDataFrame."
477
+ )
478
+ srs = self[col]
479
+ parsed_rows: list[
480
+ list[
481
+ str
482
+ ]
483
+ ] = []
484
+ all_categories = Counter()
485
+ for val in srs:
486
+ row_items = set()
487
+ if isinstance(val, (list, tuple, set)):
488
+ for item in val:
489
+ if item is not None\
490
+ and not pd.isna(item):
491
+ row_items.add(
492
+ str(item)\
493
+ .strip()\
494
+ .casefold()
495
+ )
496
+ elif isinstance(val, str):
497
+ if sep and sep in val:
498
+ for item in val.split(sep):
499
+ row_items.add(
500
+ item\
501
+ .strip()\
502
+ .casefold()
503
+ )
504
+ else:
505
+ row_items.add(
506
+ val.strip().casefold()
507
+ )
508
+ elif pd.notna(val):
509
+ row_items.add(
510
+ str(val).strip().casefold()
511
+ )
512
+ row_items.discard('')
513
+ parsed_rows.append(
514
+ list(row_items)
515
+ )
516
+ all_categories.update(
517
+ row_items
518
+ )
519
+ valid_classes = sorted([
520
+ cat\
521
+ for cat, count\
522
+ in all_categories.items()\
523
+ if count >= min_freq
524
+ ])
525
+ class_to_idx = {
526
+ cls_: idx\
527
+ for idx, cls_ in enumerate(
528
+ valid_classes
529
+ )
530
+ }
531
+ matrix = [
532
+ [0] * len(valid_classes)\
533
+ for _ in range(
534
+ len(
535
+ srs
536
+ )
537
+ )
538
+ ]
539
+ for row_idx, items in enumerate(parsed_rows):
540
+ for item in items:
541
+ if item in class_to_idx:
542
+ matrix[
543
+ row_idx
544
+ ][
545
+ class_to_idx[
546
+ item
547
+ ]
548
+ ] = 1
549
+ mhe_df: CustomDataFrame = CustomDataFrame(
550
+ matrix,
551
+ index=self.index,
552
+ columns=valid_classes
553
+ )
554
+ df_retained = self.drop(
555
+ columns=[
556
+ col
557
+ ],
558
+ errors="ignore"
559
+ )
560
+ return CustomDataFrame(
561
+ pd.concat(
562
+ [
563
+ df_retained,
564
+ mhe_df
565
+ ],
566
+ axis=1
567
+ )
568
+ )
569
+ multi_hot_encoding =\
570
+ make_multi_hot_encoding =\
571
+ make_mhe =\
572
+ pd.multi_hot_encoding =\
573
+ pd.make_multi_hot_encoding =\
574
+ pd.make_mhe =\
575
+ pd.mhe =\
576
+ mhe
577
+ rcsv =\
578
+ read_csv =\
579
+ parho_csv =\
580
+ pd.rcsv =\
581
+ pd.read_csv =\
582
+ pd.parho_csv =\
583
+ CustomDataFrame.rcsv
584
+ ohe =\
585
+ one_hot_encoding =\
586
+ make_ohe =\
587
+ make_one_hot_encoding =\
588
+ make_dummies =\
589
+ get_dummies =\
590
+ pd.ohe =\
591
+ pd.one_hot_encoding =\
592
+ pd.make_ohe =\
593
+ pd.make_one_hot_encoding =\
594
+ pd.make_dummies =\
595
+ CustomDataFrame.ohe
596
+ mhe =\
597
+ make_mhe =\
598
+ make_multi_hot_encoding =\
599
+ multi_hot_encoding =\
600
+ get_dummies_for_multi =\
601
+ pd.mhe =\
602
+ pd.make_mhe =\
603
+ pd.make_multi_hot_encoding =\
604
+ pd.make_dummies_for_multi =\
605
+ pd.multi_hot_encoding =\
606
+ CustomDataFrame.mhe
607
+ pd.DF =\
608
+ KlDF =\
609
+ KDF =\
610
+ KlangDF =\
611
+ KlangDataFrame =\
612
+ SuperDF =\
613
+ SuperDataFrame =\
614
+ CustomDF =\
615
+ CustomDataFrame
291
616
  rcsv = pd.rcsv = pd.read_csv
292
617
  rcb = pd.rcb = pd.read_clipboard
293
618
  rxl = pd.rxl = pd.rxls = pd.read_excel
@@ -353,11 +678,11 @@ try:
353
678
  # lets make it global entirely
354
679
  except ImportError:
355
680
  pass
356
- """
357
681
 
682
+ """
358
683
 
359
684
  import pandas
360
- df = pandas.DF({"Name": ["Lois", "Timothy"], "Age": [27, 51]})
685
+ df = pandas.DF({"NamE": ["Lois", "Timothy"], "Age": [27, 51]})
361
686
  df.drop(["age"], perma=No)
362
687
  #print(df.jahaan("Name nahi he ?"))
363
688
  #print(df.jahaan("Name, aur Age"))
@@ -381,7 +706,6 @@ print(tips.query("tip darmyan 3..5"))
381
706
  print("break")
382
707
  start, end = 1, 2
383
708
  print(tips["@start chota tip se joke khud choti ya barabar @end ke"])
384
- new_df = pd.DataFrame({"Tenant_ID": [f"D00{n}" for n in range(1, 3+1)]}, index=[f"Apartment {n}" for n in range(1, 3+1)])
385
709
 
386
710
  print(tips[:2, "tip":"day"])
387
711
  print(tips[0, 2])
@@ -397,4 +721,7 @@ print(tips["tip.darmyan(1..3)"])
397
721
  print(tips["tip.darmyan(1..3)"] == tips["tip darmyan 1..3"])
398
722
  print(len(tips["tip.darmyan(1..3)"]) == len(tips["tip darmyan 1..3"]))
399
723
  print(tips["tip darmyan [1, 3, 5]"])
724
+ new_df = pd.DF({"####@$ . Tenant ID": [f"@D00{n}" for n in range(1, 3+1)]}, index=[f"$$$$ ....Apartment {n}" for n in range(1, 3+1)])
725
+ new_df_clean = new_df()
726
+ print(lkism(tips))
400
727
  """
@@ -24,33 +24,49 @@ class SQL:
24
24
  print("Database not connected or invalid SQL command syntax.")
25
25
  return
26
26
  try:
27
- translated_command: str = translate_for_sql(command)
28
- self.cursor.execute(translated_command, *args, **kwargs)
29
- """
30
- self.cursor.pakro_sare_results = self.cursor.pakro_saare_results = self.cursor.fetchall
31
- self.cursor.pakro_kuch_results = self.cursor.pakro_n_results = self.cursor.fetchmany
32
- self.cursor.pakro_ek_result = self.cursor.pakro_result = self.cursor.fetchone
33
- """
27
+ translated_command: str = translate_for_sql(
28
+ command
29
+ )
30
+ self.cursor.execute(
31
+ translated_command,
32
+ *args,
33
+ **kwargs
34
+ )
34
35
  self.conn.commit()
36
+ if self.cursor\
37
+ and callable(
38
+ getattr(
39
+ self.cursor,
40
+ "fetchall"
41
+ )
42
+ ):
43
+ results: list = self.cursor\
44
+ .fetchall()
45
+ return results
35
46
  return self.cursor
36
47
  except Exception as e:
37
- print(f"SQL Error on execution: {e}\nAttempted Query: {command}")
48
+ print(
49
+ f"SQL Error on execution: {e}\n"\
50
+ + f"Attempted Query: {translated_command}"
51
+ )
38
52
  apply = karo = apply_karo = do = run = exec = execute
39
53
  DB = db_conn = dbconn = db_connect = sql_conn = sqlconn = sql_connect = SQL
40
54
 
41
55
  """
42
56
  def main() -> None:
43
- print(translate_for_sql("banao table agar na mojud Users jisme mojud id int khas auto+, name jumla"))
57
+ #print(translate_for_sql("banao table agar na mojud Users jisme mojud ((id int khas auto+, name jumla, age int))"))
58
+ #print(translate_for_sql("daalo bich Users () values ()"))
44
59
  try:
45
- db = sqlconn("test2.db")
46
- query = "BANAO Table agar na mojud Users jisme mojud id int khas auto+, name jumla?"
60
+ db = sqlconn("test2")
61
+ query = "BANAO Table agar na mojud Users jisme mojud (id int khas auto+, name jumla? nahi_to 'Anonymous')"
47
62
  db.do(query)
48
- x = db.do("chuno sab kuch Users mese")
49
- results = x.fetchall()
63
+ print(db.do("`users` me dalo (name) val ('Jackson')"))
64
+ results = db.do("chuno sab kuch Users mese")
50
65
  print(results)
51
66
  except Exception as e:
52
67
  print(e)
53
68
 
54
69
  if __name__ == "__main__":
55
70
  main()
71
+
56
72
  """
@@ -1510,10 +1510,19 @@ def translate_for_sql(text: str) -> str:
1510
1510
  dictionary: dict[str, str] = {
1511
1511
  "bana{1,2}o": "create",
1512
1512
  "chuno": "select",
1513
+ "badlo": "update",
1514
+ "rakho": "set",
1515
+ "nahi_to|def|shurwat(?:i|[_ ]*me)": "default",
1516
+ "nazaria|alias": "view",
1513
1517
  "da{1,2}lo": "insert",
1518
+ # duplicate replacement
1519
+ # but for flexibility
1520
+ # * stays untouched
1521
+ # otherwise flexibility goes away
1522
+ # do NOT remove ^
1514
1523
  "darmya{1,2}n|b(?:i|ee)ch": "into",
1515
1524
  "sab(?:[_ ]?kuch)?": "*",
1516
- "jaha{1,2}n?": "where",
1525
+ r"jaha{1,2}n?": "where",
1517
1526
  r"sirf(?= \d)": "limit",
1518
1527
  'bar[ai](?: he)?[_ ]ya[_ ]ba?ra{0,2}ba?r(?: he)?': '>=',
1519
1528
  'chot[ai](?: he)?[_ ]ya[_ ]ba?ra{0,2}ba?r(?: he)?': '<=',
@@ -1527,7 +1536,25 @@ def translate_for_sql(text: str) -> str:
1527
1536
  # sequence matters
1528
1537
  "gira{1,2}o": "drop",
1529
1538
  "(?:clea[rn]|sa{1,2}f|kha{1,2}li)[_ ]*(?:karo|table)(?:[_ ]*table)?": "delete from",
1530
- "agar": "if",
1539
+ r"agar(?! *\()": "if",
1540
+ # has more priority
1541
+ # than agar( -> IIF
1542
+ # identical, but different
1543
+ # use case:
1544
+ # banao table agar na mojud
1545
+ # `customers`
1546
+ # jisme mojud
1547
+ # (&...&)
1548
+ r"agar(?= *\()": "IIF",
1549
+ # less priority than agar(?! *\() -> if
1550
+ # identical, but different functionality
1551
+ # sqlite has IIF not IF like in mysql,
1552
+ # lookup documentation for
1553
+ # sqlite iif (immediate if)
1554
+ # use case:
1555
+ # chuno name, agar(age >= 18, 'Adult', 'Minor')
1556
+ # tor users_age_ranked
1557
+ # users mese
1531
1558
  "na(?:hi)?(?= moj(?:u|oo)d)": "not",
1532
1559
  "tor": "as",
1533
1560
  "sath": "with",
@@ -1550,15 +1577,33 @@ def translate_for_sql(text: str) -> str:
1550
1577
  strings_and_column_names: list[str] = re.findall("[`\"\'][^`\"\']*[`\"\']", translation)
1551
1578
  for i, string in enumerate(strings_and_column_names):
1552
1579
  translation = translation.replace(string, f"__STRING_{i}__", 1)
1580
+ translation = replace(
1581
+ translation,
1582
+ r"\s+",
1583
+ " "
1584
+ )
1585
+ # helps better deal with
1586
+ # linebreaks, and tabs
1553
1587
  translation = replacei(translation, r"\bjis[_ ]?me moj(?:u|oo)d \(*([^\(\)]+)\)*", "($1)")
1588
+ translation = replacei(
1589
+ translation,
1590
+ r"(?<table_name>(?<!\w)`?[A-Za-z_][\w ]*`?) me da{1,2}lo\b",
1591
+ "insert into $table_name"
1592
+ )
1593
+ # the right spot for this is ^
1594
+ # has to come BEFORE
1595
+ # key-value replacements
1554
1596
  for k, v in dictionary.items():
1555
- translation = replacei(translation, fr"\b{k}\b", v)
1556
- translation = replacei(translation, r"(?<table_name>(?<!\w)`?[A-Za-z_]\w*`?) me[_ ]?se\b", "from ${table_name}")
1597
+ translation = replacei(
1598
+ translation,
1599
+ fr"\b({k})\b",
1600
+ v
1601
+ )
1602
+ translation = replacei(translation, r"(?<table_name>(?<!\w)`?[A-Za-z_][\w ]*`?) me[_ ]?se\b", "from ${table_name}")
1557
1603
  translation = replacei(translation, r"\b(?:a(?:uto)?|khud)[_ ]*(?:\+|barh(?:ti|e))(?!\w)", "autoincrement")
1558
1604
  translation = replacei(translation, r" \b(not null)\?(?!\w)", "")
1559
- translation = replacei(translation, r" *\| *(?<defaultval>\w*)\b", " default ${defaultval}")
1605
+ translation = replacei(translation, r" *\| *", " default ")
1560
1606
  translation = replacei(translation, r"\b(?<dropping_this_to_prvt_a_lgcl_err>default false) (?<instead_keeping>(?:not null )?default [A-Za-z_]\w*)\b", "$instead_keeping")
1561
- translation = replacei(translation, r"\bhistory mode\!?(?!\w)", "set autocommit = off; commit")
1562
1607
  translation = replacei(translation, r"\b(?:begin|start|next)(?: transaction)?\:?(?!\w)", "begin transaction")
1563
1608
  translation = replacei(translation, r"\b(end|upload|push|do)[\!\.]?(?!\w)", "commit")
1564
1609
  translation = replacei(translation, r"\b(undo|revert|pop)[\!\.]?(?!\w)", "rollback")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: KL_Py
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: A Python simplification module
5
5
  Author-email: Abbaskhurram255 <abbaskhurram255@gmail.com>
6
6
  Classifier: Programming Language :: Python :: 3
File without changes
File without changes
File without changes