pokerdf 1.0.0__tar.gz → 1.0.2__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.2
4
4
  Summary: Converts poker hand history files to pandas DataFrames.
5
5
  Author: Murilo Amaral
6
6
  Author-email: murilogmamaral@gmail.com
@@ -14,8 +14,7 @@ Requires-Dist: pandas (>=2.0.0)
14
14
  Requires-Dist: pyarrow (>=16.1.0)
15
15
  Requires-Dist: pydantic (>=2.8.0)
16
16
  Requires-Dist: ruff (>=0.0.0)
17
- Project-URL: homepage, https://gitlab.com/murilogmamaral/pokerdf
18
- Project-URL: repository, https://gitlab.com/murilogmamaral/pokerdf
17
+ Project-URL: repository, https://github.com/murilogmamaral/pokerdf
19
18
  Description-Content-Type: text/markdown
20
19
 
21
20
  # PokerDF
@@ -30,22 +29,68 @@ Currently supports PokerStars. Make sure hand histories are saved in English.
30
29
 
31
30
  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
31
 
32
+ 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.
33
+
34
+ #### Before
35
+ ```
36
+ 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]
37
+ Table '3026510091 1' 3-max Seat #1 is the button
38
+ Seat 1: VillainA (500 in chips)
39
+ Seat 2: garciamurilo (500 in chips)
40
+ Seat 3: VillainB (500 in chips)
41
+ garciamurilo: posts small blind 10
42
+ VillainB: posts big blind 20
43
+ *** HOLE CARDS ***
44
+ Dealt to garciamurilo [6h Ks]
45
+ VillainB is disconnected
46
+ VillainA: folds
47
+ garciamurilo: calls 10
48
+ VillainB: checks
49
+ *** FLOP *** [4d Qs Qd]
50
+ garciamurilo: checks
51
+ VillainB: checks
52
+ *** TURN *** [4d Qs Qd] [3s]
53
+ garciamurilo: checks
54
+ VillainB: bets 20
55
+ garciamurilo: folds
56
+ Uncalled bet (20) returned to VillainB
57
+ VillainB collected 40 from pot
58
+ VillainB: doesn't show hand
59
+ *** SUMMARY ***
60
+ Total pot 40 | Rake 0
61
+ Board [4d Qs Qd 3s]
62
+ Seat 1: VillainA (button) folded before Flop (didn't bet)
63
+ Seat 2: garciamurilo (small blind) folded on the Turn
64
+ Seat 3: VillainB (big blind) collected (40)
65
+ ```
66
+
67
+ #### After
68
+
69
+ | | 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 |
70
+ |----|----------------------|-------------|-------------|------------|-----------|--------------|---------------------|---------|--------|-------------|--------------|--------------|-----------|--------------|--------|--------------|-------------|---------------|---------|----------------------|------------------|----------------------------|------------------|-------------|----------------|-------------|-------------|--------------|----------------------|------------------------|--------------|-------------|-------------------|------------|-----------|-------------|---------|
71
+ | 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 |
72
+ | 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 |
73
+ | 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 |
74
+
75
+ #### Data Modeling
76
+ 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.
77
+
78
+
33
79
  ## Installation
34
80
  ```
35
81
  pip install pokerdf
36
82
  ```
37
83
 
38
84
  ## Usage
39
- Navigate to the folder where you want to save the output:
85
+ First, navigate to the directory where you want to save the output:
40
86
  ```
41
87
  cd output_directory
42
88
  ```
43
- Then, run the package like this:
89
+ Then, run the package to convert all your hand history files:
44
90
  ```
45
91
  pokerdf convert /path/to/handhistory/folder
46
92
  ```
47
-
48
- Once the process is concluded, you will find something like this:
93
+ After the process completes, you’ll see an output similar to the following:
49
94
  ```
50
95
  output_directory/
51
96
  └── output/
@@ -67,7 +112,10 @@ output_directory/
67
112
  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
113
  5. The file `success.txt` lists all successfully converted files.
69
114
 
70
- ## DataFrame structure
115
+ #### Incremental pipeline
116
+ 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.
117
+
118
+ ## Metadata
71
119
  | Column | Description | Example | Data Type |
72
120
  |-------------------|--------------------------------------------------------------|-----------------------------------|-----------------|
73
121
  | 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.2"
4
4
  description = "Converts poker hand history files to pandas DataFrames."
5
5
  authors = ["Murilo Amaral <murilogmamaral@gmail.com>"]
6
6
  readme = "README.md"
@@ -24,8 +24,7 @@ pytest = "^7.0.1"
24
24
  pokerdf = "pokerdf.main:main"
25
25
 
26
26
  [tool.poetry.urls]
27
- homepage = "https://gitlab.com/murilogmamaral/pokerdf"
28
- repository = "https://gitlab.com/murilogmamaral/pokerdf"
27
+ repository = "https://github.com/murilogmamaral/pokerdf"
29
28
 
30
29
  [tool.flake8]
31
30
  max-line-length = 120
File without changes
File without changes
File without changes