pandaspro 0.10.1__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 (68) hide show
  1. pandaspro-0.10.1/PKG-INFO +22 -0
  2. pandaspro-0.10.1/pandaspro/__init__.py +40 -0
  3. pandaspro-0.10.1/pandaspro/core/__init__.py +0 -0
  4. pandaspro-0.10.1/pandaspro/core/api.py +37 -0
  5. pandaspro-0.10.1/pandaspro/core/dates/__init__.py +0 -0
  6. pandaspro-0.10.1/pandaspro/core/dates/methods.py +14 -0
  7. pandaspro-0.10.1/pandaspro/core/dates/now.py +37 -0
  8. pandaspro-0.10.1/pandaspro/core/frame.py +611 -0
  9. pandaspro-0.10.1/pandaspro/core/pivot.py +9 -0
  10. pandaspro-0.10.1/pandaspro/core/reshape/__init__.py +0 -0
  11. pandaspro-0.10.1/pandaspro/core/reshape/tile.py +313 -0
  12. pandaspro-0.10.1/pandaspro/core/stringfunc.py +192 -0
  13. pandaspro-0.10.1/pandaspro/core/tools/__init__.py +0 -0
  14. pandaspro-0.10.1/pandaspro/core/tools/corder.py +45 -0
  15. pandaspro-0.10.1/pandaspro/core/tools/csort.py +69 -0
  16. pandaspro-0.10.1/pandaspro/core/tools/dfilter.py +122 -0
  17. pandaspro-0.10.1/pandaspro/core/tools/indate.py +139 -0
  18. pandaspro-0.10.1/pandaspro/core/tools/inlist.py +143 -0
  19. pandaspro-0.10.1/pandaspro/core/tools/inrange.py +65 -0
  20. pandaspro-0.10.1/pandaspro/core/tools/search2df.py +142 -0
  21. pandaspro-0.10.1/pandaspro/core/tools/strpos.py +62 -0
  22. pandaspro-0.10.1/pandaspro/core/tools/tab.py +119 -0
  23. pandaspro-0.10.1/pandaspro/core/tools/toolObject.py +12 -0
  24. pandaspro-0.10.1/pandaspro/core/tools/utils.py +31 -0
  25. pandaspro-0.10.1/pandaspro/core/tools/varnames.py +84 -0
  26. pandaspro-0.10.1/pandaspro/email/__init__.py +0 -0
  27. pandaspro-0.10.1/pandaspro/email/api.py +7 -0
  28. pandaspro-0.10.1/pandaspro/email/email.py +74 -0
  29. pandaspro-0.10.1/pandaspro/email/utlis.py +8 -0
  30. pandaspro-0.10.1/pandaspro/io/__init__.py +0 -0
  31. pandaspro-0.10.1/pandaspro/io/api.py +26 -0
  32. pandaspro-0.10.1/pandaspro/io/cellpro/__init__.py +0 -0
  33. pandaspro-0.10.1/pandaspro/io/cellpro/cellpro.py +299 -0
  34. pandaspro-0.10.1/pandaspro/io/excel/__init__.py +0 -0
  35. pandaspro-0.10.1/pandaspro/io/excel/_customstyle.py +59 -0
  36. pandaspro-0.10.1/pandaspro/io/excel/base.py +112 -0
  37. pandaspro-0.10.1/pandaspro/io/excel/cdformat.py +112 -0
  38. pandaspro-0.10.1/pandaspro/io/excel/helpfile.py +0 -0
  39. pandaspro-0.10.1/pandaspro/io/excel/putexcel.py +825 -0
  40. pandaspro-0.10.1/pandaspro/io/excel/range.py +691 -0
  41. pandaspro-0.10.1/pandaspro/io/excel/wbexportsimple.py +29 -0
  42. pandaspro-0.10.1/pandaspro/io/excel/writer.py +357 -0
  43. pandaspro-0.10.1/pandaspro/sampledf/__init__.py +0 -0
  44. pandaspro-0.10.1/pandaspro/sampledf/api.py +12 -0
  45. pandaspro-0.10.1/pandaspro/sampledf/sampledf.py +1221 -0
  46. pandaspro-0.10.1/pandaspro/sampledf/testbackup_framexlwriter.py +24 -0
  47. pandaspro-0.10.1/pandaspro/test/__init__.py +0 -0
  48. pandaspro-0.10.1/pandaspro/test/cdformat_test.py +16 -0
  49. pandaspro-0.10.1/pandaspro/test/csort_test.py +12 -0
  50. pandaspro-0.10.1/pandaspro/test/framewriter_test.py +23 -0
  51. pandaspro-0.10.1/pandaspro/test/putxl_test.py +15 -0
  52. pandaspro-0.10.1/pandaspro/user_config/__init__.py +0 -0
  53. pandaspro-0.10.1/pandaspro/user_config/cd_sheets.py +231 -0
  54. pandaspro-0.10.1/pandaspro/user_config/excel_table_mydesign.py +64 -0
  55. pandaspro-0.10.1/pandaspro/user_config/style_sheets.py +50 -0
  56. pandaspro-0.10.1/pandaspro/utils/__init__.py +0 -0
  57. pandaspro-0.10.1/pandaspro/utils/cpd_logger.py +119 -0
  58. pandaspro-0.10.1/pandaspro/utils/progress_bar.py +24 -0
  59. pandaspro-0.10.1/pandaspro.egg-info/PKG-INFO +22 -0
  60. pandaspro-0.10.1/pandaspro.egg-info/SOURCES.txt +66 -0
  61. pandaspro-0.10.1/pandaspro.egg-info/dependency_links.txt +1 -0
  62. pandaspro-0.10.1/pandaspro.egg-info/requires.txt +7 -0
  63. pandaspro-0.10.1/pandaspro.egg-info/top_level.txt +2 -0
  64. pandaspro-0.10.1/setup.cfg +4 -0
  65. pandaspro-0.10.1/setup.py +31 -0
  66. pandaspro-0.10.1/tests/__init__.py +0 -0
  67. pandaspro-0.10.1/tests/core/__init__.py +0 -0
  68. pandaspro-0.10.1/tests/core/test_frame.py +24 -0
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.1
2
+ Name: pandaspro
3
+ Version: 0.10.1
4
+ Summary: Upgraded pandas package for easier dataframe operations
5
+ Home-page: https://github.com/soluentre/pandaspro
6
+ Author: Shiyao Wang and Xueqi Li
7
+ Author-email: sw1016@georgetown.edu
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=3.8
12
+ Requires-Dist: numpy~=2.0.0
13
+ Requires-Dist: pandas~=2.2.2
14
+ Requires-Dist: openpyxl~=3.1.5
15
+ Requires-Dist: xlwings~=0.31.10
16
+ Requires-Dist: jinja2~=3.1.4
17
+ Requires-Dist: termcolor~=2.4.0
18
+ Requires-Dist: tabulate~=0.9.0
19
+
20
+
21
+ pandaspro is the upgrade version of pandas Python pacakge with more user-friendly dataframe manipulating methods and
22
+ better Excel-based exporting and formatting apis
@@ -0,0 +1,40 @@
1
+ from pandaspro.email.api import (
2
+ emailfetcher,
3
+ create_mail_class
4
+ )
5
+
6
+ from pandaspro.core.api import (
7
+ bdate,
8
+ dfilter,
9
+ FramePro,
10
+ tab,
11
+ str2list,
12
+ wildcardread,
13
+ parse_method,
14
+ parse_wild,
15
+ df_with_index_for_mask,
16
+ create_column_color_dict,
17
+ csort,
18
+ )
19
+
20
+ from pandaspro.io.api import (
21
+ CellPro,
22
+ index_cell,
23
+ cell_index,
24
+ resize,
25
+ offset,
26
+ getrange,
27
+ PutxlSet,
28
+ pwread,
29
+ WorkbookExportSimplifier,
30
+ fw
31
+ )
32
+ from pandaspro.core.frame import lowervarlist
33
+
34
+ from pandaspro.sampledf.api import (
35
+ sysuse_countries,
36
+ sysuse_auto,
37
+ wbuse_pivot
38
+ )
39
+
40
+ excel_d = WorkbookExportSimplifier().declare_workbook
File without changes
@@ -0,0 +1,37 @@
1
+ from pandaspro.core.frame import FramePro
2
+
3
+ from pandaspro.core.tools.dfilter import dfilter
4
+ from pandaspro.core.tools.tab import tab
5
+ from pandaspro.core.tools.varnames import varnames
6
+ from pandaspro.core.tools.csort import csort
7
+
8
+ from pandaspro.core.tools.utils import (
9
+ df_with_index_for_mask,
10
+ create_column_color_dict
11
+ )
12
+
13
+ from pandaspro.core.dates.methods import (
14
+ bdate
15
+ )
16
+
17
+ from pandaspro.core.stringfunc import (
18
+ parse_method,
19
+ parse_wild,
20
+ wildcardread,
21
+ str2list
22
+ )
23
+
24
+
25
+ __all__ = [
26
+ "bdate",
27
+ "dfilter",
28
+ "FramePro",
29
+ "tab",
30
+ "varnames",
31
+ "parse_wild",
32
+ "parse_method",
33
+ "wildcardread",
34
+ "str2list",
35
+ "csort",
36
+ "df_with_index_for_mask"
37
+ ]
File without changes
@@ -0,0 +1,14 @@
1
+ from datetime import datetime
2
+ import re
3
+
4
+
5
+ def bdate(date_str):
6
+ if date_str == '':
7
+ return ''
8
+ if re.fullmatch("\d{4}-\d{2}-\d{2}", date_str):
9
+ date_obj = datetime.strptime(date_str, '%Y-%m-%d')
10
+ return date_obj.strftime("%d %B %Y")
11
+ elif re.fullmatch("\d{4}-\d{2}", date_str):
12
+ date_obj = datetime.strptime(date_str, '%Y-%m')
13
+ return date_obj.strftime("%B %Y")
14
+ return "Invalid date format"
@@ -0,0 +1,37 @@
1
+ from datetime import datetime
2
+
3
+
4
+ def now(format='B, Y', override=False, info=False):
5
+ if info == True:
6
+ print('''
7
+ By default, the function will seperate ...
8
+ ''')
9
+
10
+ format_mapping = {
11
+ 'BdY': '%B %d, %Y',
12
+ 'bdY': '%b %d, %Y'
13
+ }
14
+
15
+ def refine_format(format):
16
+ for letter in ['b', 'B', 'Y', 'm', 'd']:
17
+ format = format.replace(letter, '%' + letter)
18
+ return format
19
+
20
+ if override == False:
21
+ format = format_mapping[format] if format in format_mapping.keys() else ''.join(
22
+ filter(lambda x: x.isalpha() or x == '%', format))
23
+
24
+ return datetime.now().strftime(format)
25
+ elif override == True:
26
+ return datetime.now().strftime(format)
27
+
28
+
29
+ print(now())
30
+
31
+
32
+ def currentdate(display='textDMY'):
33
+ if display == 'num':
34
+ return datetime.now().strftime("%Y-%m-%d").replace('-', '')
35
+ if display == 'textDMY':
36
+ return datetime.now().strftime("%d") + " " + month_mapping[
37
+ int(datetime.now().strftime("%Y-%m").split('-')[1])] + " " + datetime.now().strftime("%Y-%m").split('-')[0]