byzh-core 0.0.9.0__py3-none-any.whl → 0.0.9.2__py3-none-any.whl

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.
@@ -1,4 +1,5 @@
1
1
  import pandas as pd
2
+ from typing import Literal
2
3
 
3
4
  from .. import B_os
4
5
 
@@ -10,7 +11,7 @@ class B_Record1d:
10
11
  recorder.write(name="Bob", age=30, city="Beijing")
11
12
  recorder.write(name="Charlie", age=22, city="Shenzhen")
12
13
  '''
13
- def __init__(self, csv_path, mode="a"):
14
+ def __init__(self, csv_path, mode:Literal["w", "a"]="w"):
14
15
  self.csv_path = csv_path
15
16
 
16
17
  B_os.makedirs(csv_path)
@@ -1,10 +1,10 @@
1
1
  import pandas as pd
2
- from typing import Any
2
+ from typing import Literal
3
3
 
4
4
  from .. import B_os
5
5
 
6
6
  class B_Record2d:
7
- def __init__(self, csv_path, mode="a"):
7
+ def __init__(self, csv_path, mode:Literal["w", "a"]="w"):
8
8
  self.csv_path = csv_path
9
9
 
10
10
  B_os.makedirs(csv_path)
@@ -28,8 +28,15 @@ class B_Record2d:
28
28
  self.data.loc[row, col] = value
29
29
  self.__save()
30
30
 
31
+ # 转置
32
+ def T(self):
33
+ self.data = self.data.T.copy()
34
+ self.__save()
35
+ return self
36
+
31
37
  def write(self, row, col, value):
32
38
  self[row, col] = value
39
+ return self
33
40
 
34
41
  def get(self, row, col):
35
42
  return self[row, col]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: byzh-core
3
- Version: 0.0.9.0
3
+ Version: 0.0.9.2
4
4
  Summary: byzh-core是byzh系列的核心库,包含了一些常用的工具函数和类。
5
5
  Author: byzh_rc
6
6
  License: MIT
@@ -3,8 +3,8 @@ byzh/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  byzh/core/Barchive/__init__.py,sha256=wUdz646VS0Uhq9lwMkd3YQHCvQhLDqgADoDjFGMqIn0,65
4
4
  byzh/core/Barchive/archive.py,sha256=S1hy3qYFEZr5RRmx_Mnq1s2IMUEw973ny1rKSL7J_a0,6721
5
5
  byzh/core/Brecorder/__init__.py,sha256=rYlgYIhr_AcPuGkZRCitbi2_hZYyoERk4XIZ14CU1dk,108
6
- byzh/core/Brecorder/record1d.py,sha256=0iPVzX5-x-iX02HMZSq0goekNp-_g2W3uS0ZaHlAEkY,2037
7
- byzh/core/Brecorder/record2d.py,sha256=vVCJ5iJ-EFw4ACdKIGfUdLNlMhQsgTbZtqp-EBO4h_M,2320
6
+ byzh/core/Brecorder/record1d.py,sha256=P7y4Gbc0zYcRsZBT4CeYgv35k0tU4h3ED-3H8RQ6cuU,2083
7
+ byzh/core/Brecorder/record2d.py,sha256=7JlM9VQnKNV6qGpC6cXZ5gdEROFeDCO840Gq6Y4dciw,2481
8
8
  byzh/core/Btable/__init__.py,sha256=NlQBjp_mvObEUm4y6wXbGipkNM2N3uNIUidaJkTwFsw,62
9
9
  byzh/core/Btable/auto_table.py,sha256=avMeRWydw9L8s3fU0-BSl8a2dCyreIUzW--csm5eR0g,14734
10
10
  byzh/core/Bterminal/__init__.py,sha256=azRLD-kY8Tv2c3llHRBrEJIdVgYw6hAoLgzJeA4PvE0,142
@@ -18,9 +18,9 @@ byzh/core/Butils/text_style.py,sha256=34u2-Rsur63iNQ0m7tHxpFWqnQZWybSxBx7vnhOhqD
18
18
  byzh/core/Butils/timer.py,sha256=OLxbWWRauYjp1KwavACjoyrqrCciUiIG2ae7qgtZrVA,511
19
19
  byzh/core/Bwriter/__init__.py,sha256=QcHzKs0305Pr78ZvZgcC_4miSYZh8jJQDt5TD0GIeEg,82
20
20
  byzh/core/Bwriter/writer.py,sha256=ss9EWo-l7czBUlY7Fu0buvQgO5fRspYKtC2X6eaRa0c,3213
21
- byzh_core-0.0.9.0.dist-info/LICENSE,sha256=-nRwf0Xga4AX5bsWBXXflpDpgX_U23X06oAMcdf0dSY,1089
22
- byzh_core-0.0.9.0.dist-info/METADATA,sha256=96-JretCMR_wj3-RuS61cG2edQTRO1pT20FD8P1DpNw,371
23
- byzh_core-0.0.9.0.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
24
- byzh_core-0.0.9.0.dist-info/entry_points.txt,sha256=qoN3Uvulj0BcOQVDqsFqP2dBVQzG1QrUtC5wFsghSLo,51
25
- byzh_core-0.0.9.0.dist-info/top_level.txt,sha256=tmaFVY8uApe6apOETSOgwz-4v5Mj4uxgRT8yNnDNZNA,5
26
- byzh_core-0.0.9.0.dist-info/RECORD,,
21
+ byzh_core-0.0.9.2.dist-info/LICENSE,sha256=-nRwf0Xga4AX5bsWBXXflpDpgX_U23X06oAMcdf0dSY,1089
22
+ byzh_core-0.0.9.2.dist-info/METADATA,sha256=vyEpFvofVI_8b5BgXNHgjxLLNTO8G3gC6q-BAX9gAt4,371
23
+ byzh_core-0.0.9.2.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
24
+ byzh_core-0.0.9.2.dist-info/entry_points.txt,sha256=qoN3Uvulj0BcOQVDqsFqP2dBVQzG1QrUtC5wFsghSLo,51
25
+ byzh_core-0.0.9.2.dist-info/top_level.txt,sha256=tmaFVY8uApe6apOETSOgwz-4v5Mj4uxgRT8yNnDNZNA,5
26
+ byzh_core-0.0.9.2.dist-info/RECORD,,