data-manipulation 0.41__tar.gz → 0.42__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 (31) hide show
  1. {data_manipulation-0.41/data_manipulation.egg-info → data_manipulation-0.42}/PKG-INFO +1 -1
  2. {data_manipulation-0.41 → data_manipulation-0.42}/data_manipulation/_version.py +3 -3
  3. {data_manipulation-0.41 → data_manipulation-0.42}/data_manipulation/base.py +16 -0
  4. {data_manipulation-0.41 → data_manipulation-0.42}/data_manipulation/pandas_.py +24 -0
  5. {data_manipulation-0.41 → data_manipulation-0.42/data_manipulation.egg-info}/PKG-INFO +1 -1
  6. {data_manipulation-0.41 → data_manipulation-0.42}/LICENSE +0 -0
  7. {data_manipulation-0.41 → data_manipulation-0.42}/MANIFEST.in +0 -0
  8. {data_manipulation-0.41 → data_manipulation-0.42}/README.md +0 -0
  9. {data_manipulation-0.41 → data_manipulation-0.42}/data_manipulation/__init__.py +0 -0
  10. {data_manipulation-0.41 → data_manipulation-0.42}/data_manipulation/beautifulsoup_.py +0 -0
  11. {data_manipulation-0.41 → data_manipulation-0.42}/data_manipulation/boto3_.py +0 -0
  12. {data_manipulation-0.41 → data_manipulation-0.42}/data_manipulation/cryptography_.py +0 -0
  13. {data_manipulation-0.41 → data_manipulation-0.42}/data_manipulation/django_.py +0 -0
  14. {data_manipulation-0.41 → data_manipulation-0.42}/data_manipulation/flask_.py +0 -0
  15. {data_manipulation-0.41 → data_manipulation-0.42}/data_manipulation/geopandas_.py +0 -0
  16. {data_manipulation-0.41 → data_manipulation-0.42}/data_manipulation/kerberos_.py +0 -0
  17. {data_manipulation-0.41 → data_manipulation-0.42}/data_manipulation/mysql_connector_python_.py +0 -0
  18. {data_manipulation-0.41 → data_manipulation-0.42}/data_manipulation/openldap_.py +0 -0
  19. {data_manipulation-0.41 → data_manipulation-0.42}/data_manipulation/prometheus_.py +0 -0
  20. {data_manipulation-0.41 → data_manipulation-0.42}/data_manipulation/psycopg2_.py +0 -0
  21. {data_manipulation-0.41 → data_manipulation-0.42}/data_manipulation/psycopg_.py +0 -0
  22. {data_manipulation-0.41 → data_manipulation-0.42}/data_manipulation/pyspark_.py +0 -0
  23. {data_manipulation-0.41 → data_manipulation-0.42}/data_manipulation/smtplib_.py +0 -0
  24. {data_manipulation-0.41 → data_manipulation-0.42}/data_manipulation/sqlalchemy_.py +0 -0
  25. {data_manipulation-0.41 → data_manipulation-0.42}/data_manipulation.egg-info/SOURCES.txt +0 -0
  26. {data_manipulation-0.41 → data_manipulation-0.42}/data_manipulation.egg-info/dependency_links.txt +0 -0
  27. {data_manipulation-0.41 → data_manipulation-0.42}/data_manipulation.egg-info/requires.txt +0 -0
  28. {data_manipulation-0.41 → data_manipulation-0.42}/data_manipulation.egg-info/top_level.txt +0 -0
  29. {data_manipulation-0.41 → data_manipulation-0.42}/setup.cfg +0 -0
  30. {data_manipulation-0.41 → data_manipulation-0.42}/setup.py +0 -0
  31. {data_manipulation-0.41 → data_manipulation-0.42}/versioneer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: data_manipulation
3
- Version: 0.41
3
+ Version: 0.42
4
4
  Summary: Powerful data manipulation
5
5
  Home-page: https://github.com/shawnngtq/data-manipulation
6
6
  Author: Shawn Ng
@@ -8,11 +8,11 @@ import json
8
8
 
9
9
  version_json = '''
10
10
  {
11
- "date": "2024-06-02T13:56:45+0800",
11
+ "date": "2024-08-03T10:19:19+0800",
12
12
  "dirty": false,
13
13
  "error": null,
14
- "full-revisionid": "87e16d5a881cc730eaa2b216d040ab445495cac6",
15
- "version": "0.41"
14
+ "full-revisionid": "30171014f9c6ac9bcb9c5aad60d40e662d35ab79",
15
+ "version": "0.42"
16
16
  }
17
17
  ''' # END VERSION_JSON
18
18
 
@@ -121,6 +121,22 @@ def get_country_name_variation() -> dict:
121
121
  return variations
122
122
 
123
123
 
124
+ def get_country_code_variation() -> dict:
125
+ variations = {
126
+ "BA": ["BOSNIA"],
127
+ "BW": ["AFRICA"],
128
+ "CN": ["REPUBLIC OF CHINA"],
129
+ "CZ": ["CZECH REPUBLIC"],
130
+ "KR": ["REPUBLIC OF KOREA"],
131
+ "MK": ["MACEDONIA"],
132
+ "RU": ["RUSSIAN FEDERATION"],
133
+ "SK": ["SLAVONIC", "SLOVAK REPUBLIC"],
134
+ "TR": ["TURKEY", "TURKIYE"],
135
+ "US": ["UNITED STATES"],
136
+ }
137
+ return variations
138
+
139
+
124
140
  def list_tuple_without_none(list_tuple: list | tuple) -> list | tuple:
125
141
  """
126
142
  Return the given list / tuple without None variation
@@ -20,6 +20,30 @@ def config_pandas_display():
20
20
  pd.set_option("display.expand_frame_repr", True)
21
21
 
22
22
 
23
+ # JUPYTER
24
+ def is_running_in_jupyter():
25
+ """
26
+ Running in jupyter?
27
+
28
+ Returns
29
+ -------
30
+ bool
31
+ True means running in jupyter env
32
+ """
33
+ try:
34
+ # Check if the IPython module is available
35
+ from IPython import get_ipython
36
+
37
+ # Check if we are in a notebook environment
38
+ if "IPKernelApp" in get_ipython().config:
39
+ return True
40
+ else:
41
+ return False
42
+ # IPython module not found, not running in Jupyter Notebook
43
+ except ImportError:
44
+ return False
45
+
46
+
23
47
  # COLUMN
24
48
  def add_type_columns(dataframe):
25
49
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: data_manipulation
3
- Version: 0.41
3
+ Version: 0.42
4
4
  Summary: Powerful data manipulation
5
5
  Home-page: https://github.com/shawnngtq/data-manipulation
6
6
  Author: Shawn Ng