Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
P1_ESI_RubenGarciaVazquez
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
rubegar
P1_ESI_RubenGarciaVazquez
Commits
dd5eae5c
Commit
dd5eae5c
authored
8 months ago
by
rubegar
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parent
a9898269
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
restar.py
+21
-0
21 additions, 0 deletions
restar.py
with
21 additions
and
0 deletions
restar.py
0 → 100644
+
21
−
0
View file @
dd5eae5c
import
csv
def
restar_tiempo_pequeno
(
file_path
):
with
open
(
file_path
,
'
r
'
)
as
file
:
reader
=
csv
.
DictReader
(
file
)
fieldnames
=
reader
.
fieldnames
+
[
'
tiempo_resultado
'
]
rows
=
list
(
reader
)
with
open
(
'
diferencias.csv
'
,
'
w
'
,
newline
=
''
)
as
result_file
:
writer
=
csv
.
DictWriter
(
result_file
,
fieldnames
=
fieldnames
)
writer
.
writeheader
()
for
row
in
rows
:
tiempo_grande
=
float
(
row
[
'
tiempoGrande
'
])
tiempo_pequeno
=
float
(
row
[
'
tiempoPequeño
'
])
tiempo_resultado
=
tiempo_grande
-
tiempo_pequeno
row
[
'
tiempo_resultado
'
]
=
tiempo_resultado
writer
.
writerow
(
row
)
restar_tiempo_pequeno
(
'
medidas_juntos.csv
'
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment