pokerdf 1.0.0__py3-none-any.whl → 1.0.1__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.
@@ -381,7 +381,7 @@ class RegexPatterns:
381
381
  list: List with the stack of the player (for example, ['500']).
382
382
  """
383
383
  # Pattern to extract
384
- regex = rf"Seat \d+: {player} \((\d+) in chips\)"
384
+ regex = rf"Seat \d+: {player} \((\d+) in chips"
385
385
 
386
386
  # Get the first content of a played hand
387
387
  target = hand[0]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pokerdf
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: Converts poker hand history files to pandas DataFrames.
5
5
  Author: Murilo Amaral
6
6
  Author-email: murilogmamaral@gmail.com
@@ -30,22 +30,68 @@ Currently supports PokerStars. Make sure hand histories are saved in English.
30
30
 
31
31
  Converting raw hand histories into structured data is the first step toward building a solid poker strategy and maximizing ROI. What are the optimal VPIP, PFR, and C-BET frequencies for No Limit Hold'em 6-Max? In which specific situations is a 3-Bet most profitable? When is bluffing a clear mistake? Once your data is organized in a Pandas DataFrame, the analytical explorations become unlimited, opening new possibilities to fine-tune your decision-making.
32
32
 
33
+ In the processed DataFrame, each row corresponds to a specific player in a specific hand, containing all relevant information about that instance of the game. Below, you’ll find an example of hand history before and after processing.
34
+
35
+ #### Before
36
+ ```
37
+ PokerStars Hand #219372022626: Tournament #3026510091, $1.84+$0.16 USD Hold'em No Limit - Level I (10/20) - 2020/10/14 10:33:59 BRT [2020/10/14 9:33:59 ET]
38
+ Table '3026510091 1' 3-max Seat #1 is the button
39
+ Seat 1: VillainA (500 in chips)
40
+ Seat 2: garciamurilo (500 in chips)
41
+ Seat 3: VillainB (500 in chips)
42
+ garciamurilo: posts small blind 10
43
+ VillainB: posts big blind 20
44
+ *** HOLE CARDS ***
45
+ Dealt to garciamurilo [6h Ks]
46
+ VillainB is disconnected
47
+ VillainA: folds
48
+ garciamurilo: calls 10
49
+ VillainB: checks
50
+ *** FLOP *** [4d Qs Qd]
51
+ garciamurilo: checks
52
+ VillainB: checks
53
+ *** TURN *** [4d Qs Qd] [3s]
54
+ garciamurilo: checks
55
+ VillainB: bets 20
56
+ garciamurilo: folds
57
+ Uncalled bet (20) returned to VillainB
58
+ VillainB collected 40 from pot
59
+ VillainB: doesn't show hand
60
+ *** SUMMARY ***
61
+ Total pot 40 | Rake 0
62
+ Board [4d Qs Qd 3s]
63
+ Seat 1: VillainA (button) folded before Flop (didn't bet)
64
+ Seat 2: garciamurilo (small blind) folded on the Turn
65
+ Seat 3: VillainB (big blind) collected (40)
66
+ ```
67
+
68
+ #### After
69
+
70
+ | | Modality | TableSize | BuyIn | TournID | TableID | HandID | LocalTime | Level | Ante | Blinds | Owner | OwnersHand | Playing | Player | Seat | PostedAnte | Position | PostedBlind | Stack | PreflopAction | FlopAction | TurnAction | RiverAction | AnteAllIn | PreflopAllIn | FlopAllIn | TurnAllIn | RiverAllIn | BoardFlop | BoardTurn | BoardRiver | ShowDown | CardCombination | Result | Balance | FinalRank | Prize |
71
+ |----|----------------------|-------------|-------------|------------|-----------|--------------|---------------------|---------|--------|-------------|--------------|--------------|-----------|--------------|--------|--------------|-------------|---------------|---------|----------------------|------------------|----------------------------|------------------|-------------|----------------|-------------|-------------|--------------|----------------------|------------------------|--------------|-------------|-------------------|------------|-----------|-------------|---------|
72
+ | 0 | USD Hold'em No Limit | 3 | $1.84+$0.16 | 3026510091 | 1 | 219372022626 | 2020-10-14 10:33:59 | I | None | [10.0, 20.0] | garciamurilo | ['6h', 'Ks'] | 3 | VillainA | 1 | None | button | nan | 500 | ['folds', ''] | ['', ''] | ['', ''] | ['', ''] | False | False | False | False | False | ['4d', 'Qs', 'Qd'] | ['4d', 'Qs', 'Qd', '3s'] | [] | [None, None] | None | folded | nan | -1 | None |
73
+ | 1 | USD Hold'em No Limit | 3 | $1.84+$0.16 | 3026510091 | 1 | 219372022626 | 2020-10-14 10:33:59 | I | None | [10.0, 20.0] | garciamurilo | ['6h', 'Ks'] | 3 | garciamurilo | 2 | None | small blind | 10 | 500 | ['calls', '10'] | ['checks', ''] | ['checks', ''], ['folds', ''] | ['', ''] | False | False | False | False | False | ['4d', 'Qs', 'Qd'] | ['4d', 'Qs', 'Qd', '3s'] | [] | [None, None] | None | folded | nan | -1 | None |
74
+ | 2 | USD Hold'em No Limit | 3 | $1.84+$0.16 | 3026510091 | 1 | 219372022626 | 2020-10-14 10:33:59 | I | None | [10.0, 20.0] | garciamurilo | ['6h', 'Ks'] | 3 | VillainB | 3 | None | big blind | 20 | 500 | ['checks', ''] | ['checks', ''] | ['bets', '20'] | ['', ''] | False | False | False | False | False | ['4d', 'Qs', 'Qd'] | ['4d', 'Qs', 'Qd', '3s'] | [] | [None, None] | None | non-sd win | 40 | -1 | None |
75
+
76
+ #### Data Modeling
77
+ For advanced analytics, you will need to transform the data and explore different data models. The final structure of your data may vary depending on the specific goals of your project.
78
+
79
+
33
80
  ## Installation
34
81
  ```
35
82
  pip install pokerdf
36
83
  ```
37
84
 
38
85
  ## Usage
39
- Navigate to the folder where you want to save the output:
86
+ First, navigate to the directory where you want to save the output:
40
87
  ```
41
88
  cd output_directory
42
89
  ```
43
- Then, run the package like this:
90
+ Then, run the package to convert all your hand history files:
44
91
  ```
45
92
  pokerdf convert /path/to/handhistory/folder
46
93
  ```
47
-
48
- Once the process is concluded, you will find something like this:
94
+ After the process completes, you’ll see an output similar to the following:
49
95
  ```
50
96
  output_directory/
51
97
  └── output/
@@ -67,7 +113,10 @@ output_directory/
67
113
  4. The file `fail.txt` provides detailed information about any files that failed to process. This file is only generated if there are failures.
68
114
  5. The file `success.txt` lists all successfully converted files.
69
115
 
70
- ## DataFrame structure
116
+ #### Incremental pipeline
117
+ You may want to build a pipeline to incrementally feed your table with new hand history data. In that case, you can import the `convert_txt_to_tabular_data` function and use it in your workflows. Refer to the docstrings and explore its usage within the package to better understand how it works.
118
+
119
+ ## Metadata
71
120
  | Column | Description | Example | Data Type |
72
121
  |-------------------|--------------------------------------------------------------|-----------------------------------|-----------------|
73
122
  | Modality | The type of game being played | Hold'em No Limit | string |
@@ -2,11 +2,11 @@ pokerdf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  pokerdf/core/read_and_convert.py,sha256=RKrc4T2wdqOnsu_A1FkZsVQj4sQ_A3T3nbmksdYqexY,7058
3
3
  pokerdf/main.py,sha256=wZNxv8Os29FErPSqwtW4EL6W9g7Hrs-3YrLNOUBfwUU,2609
4
4
  pokerdf/regex/regex_execution.py,sha256=Z7rAJAk_VaeamJ6O-i_WqqSN7E2Bvds6zNKDqf9PWgk,3333
5
- pokerdf/regex/regex_patterns.py,sha256=JENvc817pZFdFqdF8wpX6Ste8WVHBr6s-PLkKi8Krlo,22805
5
+ pokerdf/regex/regex_patterns.py,sha256=9UV7K-ojFgUkmbdfBTmfYi_-qKT6OsSO4W5Btcy4gTc,22803
6
6
  pokerdf/utils/strings.py,sha256=M67LK8HDsCRJbMosSpldAhkh7dJbvFm3P_cwCJJwABo,24
7
7
  pokerdf/validation/pydantic_modules.py,sha256=sta6I4kOSpVVp1ztMds-6um6GKzHjmKJMdWWjVgi2vs,1302
8
- pokerdf-1.0.0.dist-info/LICENSE,sha256=cwU1q-Z805EbGDpnov1ZMvOm_1FN9GHLUymwEy7poHM,1070
9
- pokerdf-1.0.0.dist-info/METADATA,sha256=341-TwDhU7nUOsOLaSzTzRZZpfp8elWIYC1DdTTWcAw,8314
10
- pokerdf-1.0.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
11
- pokerdf-1.0.0.dist-info/entry_points.txt,sha256=Ut_cKkG47Nvu8xyWDuDLPo7qry4Wye_te9Y3LqWNwA8,45
12
- pokerdf-1.0.0.dist-info/RECORD,,
8
+ pokerdf-1.0.1.dist-info/LICENSE,sha256=cwU1q-Z805EbGDpnov1ZMvOm_1FN9GHLUymwEy7poHM,1070
9
+ pokerdf-1.0.1.dist-info/METADATA,sha256=j49HeDSDZhvdf4nz1nOgl1mFFzv8EPAL9mvRGEUa8j4,13062
10
+ pokerdf-1.0.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
11
+ pokerdf-1.0.1.dist-info/entry_points.txt,sha256=Ut_cKkG47Nvu8xyWDuDLPo7qry4Wye_te9Y3LqWNwA8,45
12
+ pokerdf-1.0.1.dist-info/RECORD,,