Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qbe
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
A
Anaïs Halftermeyer
queryByExample
qbe
Commits
a0f0d3f7
Commit
a0f0d3f7
authored
Jun 30, 2025
by
Elias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
keep only lines where Val is at least 2 and Test is at least 2
parent
6680fc6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
TrainValTest6_Random.py
TrainValTest6_Random.py
+18
-0
No files found.
TrainValTest6_Random.py
0 → 100755
View file @
a0f0d3f7
import
csv
input_file
=
"res5_Random.csv"
output_file
=
"res6_Random.csv"
with
open
(
input_file
,
mode
=
"r"
,
newline
=
""
)
as
f_in
,
open
(
output_file
,
mode
=
"w"
,
newline
=
""
)
as
f_out
:
reader
=
csv
.
reader
(
f_in
)
writer
=
csv
.
writer
(
f_out
)
header
=
next
(
reader
)
writer
.
writerow
(
header
)
# écrire l'en-tête
for
row
in
reader
:
mot
,
train
,
val
,
test
=
row
if
int
(
train
)
>=
2
and
int
(
val
)
>=
2
and
int
(
test
)
>=
2
:
writer
.
writerow
(
row
)
print
(
f
"Fichier filtré sauvegardé dans '{output_file}'"
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment