user27246: I need help to generate structured data from the PGN file as discs into a list in Python, or similar.
For example, say that I need to read this PGN file.
#######################################################
[Event "Teste_0-1500 c"]
[Site "HIGGS-PC"]
[Date "2021.03.13"]
[Round "1"]
[White "Cfish1200-modern"]
[Black "Cmcchess 2.27"]
[Result "1-0"]
[ECO "B33"]
[WhiteElo "1415"]
[BlackElo "1330"]
[Annotator "Boson,Higgs"]
[PlyCount "160"]
[EventDate "2021.??.??"]

e4 ({Stockfish 13: (7453kN)} 1. d4 Nf6 2. c4 e6 3. Nf3 d5 4.
Nc3 c6 5. e3 Nbd7 6. Be2 Bd6 7. O-O O-O 8. Qc2 e5 9. cxd5 cxd5 10. dxe5 Nxe5

#######################################################
I want to generate a data structure from the first PGN game to generate a list of discs.
[{'whiteplayer_name':'Cfish1200-modern', 'whiteplayer_Elo':1415, 'mainline_move_1_white':'e4', 'mainline_move_2_white':'Nf3', 'mainline_move_3_white':'d4',...,etc.}, {'Engine_1_name': 'Stockfish 13', 'move_white_suggested_by_engine_1_for_move_1':'d4', 'move_white_suggested_by_engine_1_for_move_2':'Nf3', 'move_white_suggested_by_engine_1_for_move_3':'Bb5', ... , etc., 'move_white_eval_by_engine_1_for_move_1':15, 'move_white_eval_by_engine_1_for_move_2':29, 'move_white_eval_by_engine_1_for_move_3':37}, {'Engine_2_name': 'Eman 6.94 64-bit SSE41 POPCNT', 'move_white_suggested_by_engine_2_for_move_1':'e4', 'move_white_suggested_by_engine_2_for_move_2':'Nf3', 'move_white_suggested_by_engine_2_for_move_3':'Bb5',...,etc., 'move_white_eval_by_engine_2_for_move_1':27, 'move_white_eval_by_engine_2_for_move_2':30, 'move_white_eval_by_engine_2_for_move_3':32,...,etc.}, etc.]
The same foes for the Black player and other such games. In total, I have around 600 games, each game analyzed by ~100 engines.  Engines per game are not the same for all games and not the same number of engines per game.  I tried to use chess.pgn, but I am a noob and could only extract the header data and mainline moves.

user9684: Python has a pgn parser as part of its chess library.
https://python-chess.readthedocs.io/en/latest/

27246: <p>I need help to generate structured data from the PGN file as discs into a list in Python, or similar.</p>
<p>For example, say that I need to read this PGN file.</p>
<p>#######################################################</p>
<p>[Event &quot;Teste_0-1500 c&quot;]
[Site &quot;HIGGS-PC&quot;]
[Date &quot;2021.03.13&quot;]
[Round &quot;1&quot;]
[White &quot;Cfish1200-modern&quot;]
[Black &quot;Cmcchess 2.27&quot;]
[Result &quot;1-0&quot;]
[ECO &quot;B33&quot;]
[WhiteElo &quot;1415&quot;]
[BlackElo &quot;1330&quot;]
[Annotator &quot;Boson,Higgs&quot;]
[PlyCount &quot;160&quot;]
[EventDate &quot;2021.??.??&quot;]</p>
<ol>
<li>e4 ({Stockfish 13: (7453kN)} 1. d4 Nf6 2. c4 e6 3. Nf3 d5 4.
Nc3 c6 5. e3 Nbd7 6. Be2 Bd6 7. O-O O-O 8. Qc2 e5 9. cxd5 cxd5 10. dxe5 Nxe5</li>
</ol>
<p>#######################################################</p>
<p>I want to generate a data structure from the first PGN game to generate a list of discs.</p>
<p>[{'whiteplayer_name':'Cfish1200-modern', 'whiteplayer_Elo':1415, 'mainline_move_1_white':'e4', 'mainline_move_2_white':'Nf3', 'mainline_move_3_white':'d4',...,etc.}, {'Engine_1_name': 'Stockfish 13', 'move_white_suggested_by_engine_1_for_move_1':'d4', 'move_white_suggested_by_engine_1_for_move_2':'Nf3', 'move_white_suggested_by_engine_1_for_move_3':'Bb5', ... , etc., 'move_white_eval_by_engine_1_for_move_1':15, 'move_white_eval_by_engine_1_for_move_2':29, 'move_white_eval_by_engine_1_for_move_3':37}, {'Engine_2_name': 'Eman 6.94 64-bit SSE41 POPCNT', 'move_white_suggested_by_engine_2_for_move_1':'e4', 'move_white_suggested_by_engine_2_for_move_2':'Nf3', 'move_white_suggested_by_engine_2_for_move_3':'Bb5',...,etc., 'move_white_eval_by_engine_2_for_move_1':27, 'move_white_eval_by_engine_2_for_move_2':30, 'move_white_eval_by_engine_2_for_move_3':32,...,etc.}, etc.]</p>
<p>The same foes for the Black player and other such games. In total, I have around 600 games, each game analyzed by ~100 engines.  Engines per game are not the same for all games and not the same number of engines per game.  I tried to use chess.pgn, but I am a noob and could only extract the header data and mainline moves.</p>
 9684: <p>Python has a pgn parser as part of its chess library.</p>
<p><a href="https://python-chess.readthedocs.io/en/latest/" rel="nofollow noreferrer">https://python-chess.readthedocs.io/en/latest/</a></p>
