pokerdf 1.0.0__tar.gz → 1.0.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.
@@ -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 |
@@ -10,22 +10,68 @@ Currently supports PokerStars. Make sure hand histories are saved in English.
10
10
 
11
11
  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.
12
12
 
13
+ 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.
14
+
15
+ #### Before
16
+ ```
17
+ 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]
18
+ Table '3026510091 1' 3-max Seat #1 is the button
19
+ Seat 1: VillainA (500 in chips)
20
+ Seat 2: garciamurilo (500 in chips)
21
+ Seat 3: VillainB (500 in chips)
22
+ garciamurilo: posts small blind 10
23
+ VillainB: posts big blind 20
24
+ *** HOLE CARDS ***
25
+ Dealt to garciamurilo [6h Ks]
26
+ VillainB is disconnected
27
+ VillainA: folds
28
+ garciamurilo: calls 10
29
+ VillainB: checks
30
+ *** FLOP *** [4d Qs Qd]
31
+ garciamurilo: checks
32
+ VillainB: checks
33
+ *** TURN *** [4d Qs Qd] [3s]
34
+ garciamurilo: checks
35
+ VillainB: bets 20
36
+ garciamurilo: folds
37
+ Uncalled bet (20) returned to VillainB
38
+ VillainB collected 40 from pot
39
+ VillainB: doesn't show hand
40
+ *** SUMMARY ***
41
+ Total pot 40 | Rake 0
42
+ Board [4d Qs Qd 3s]
43
+ Seat 1: VillainA (button) folded before Flop (didn't bet)
44
+ Seat 2: garciamurilo (small blind) folded on the Turn
45
+ Seat 3: VillainB (big blind) collected (40)
46
+ ```
47
+
48
+ #### After
49
+
50
+ | | 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 |
51
+ |----|----------------------|-------------|-------------|------------|-----------|--------------|---------------------|---------|--------|-------------|--------------|--------------|-----------|--------------|--------|--------------|-------------|---------------|---------|----------------------|------------------|----------------------------|------------------|-------------|----------------|-------------|-------------|--------------|----------------------|------------------------|--------------|-------------|-------------------|------------|-----------|-------------|---------|
52
+ | 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 |
53
+ | 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 |
54
+ | 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 |
55
+
56
+ #### Data Modeling
57
+ 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.
58
+
59
+
13
60
  ## Installation
14
61
  ```
15
62
  pip install pokerdf
16
63
  ```
17
64
 
18
65
  ## Usage
19
- Navigate to the folder where you want to save the output:
66
+ First, navigate to the directory where you want to save the output:
20
67
  ```
21
68
  cd output_directory
22
69
  ```
23
- Then, run the package like this:
70
+ Then, run the package to convert all your hand history files:
24
71
  ```
25
72
  pokerdf convert /path/to/handhistory/folder
26
73
  ```
27
-
28
- Once the process is concluded, you will find something like this:
74
+ After the process completes, you’ll see an output similar to the following:
29
75
  ```
30
76
  output_directory/
31
77
  └── output/
@@ -47,7 +93,10 @@ output_directory/
47
93
  4. The file `fail.txt` provides detailed information about any files that failed to process. This file is only generated if there are failures.
48
94
  5. The file `success.txt` lists all successfully converted files.
49
95
 
50
- ## DataFrame structure
96
+ #### Incremental pipeline
97
+ 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.
98
+
99
+ ## Metadata
51
100
  | Column | Description | Example | Data Type |
52
101
  |-------------------|--------------------------------------------------------------|-----------------------------------|-----------------|
53
102
  | Modality | The type of game being played | Hold'em No Limit | string |
@@ -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
  [tool.poetry]
2
2
  name = "pokerdf"
3
- version = "1.0.0"
3
+ version = "1.0.1"
4
4
  description = "Converts poker hand history files to pandas DataFrames."
5
5
  authors = ["Murilo Amaral <murilogmamaral@gmail.com>"]
6
6
  readme = "README.md"
File without changes
File without changes
File without changes