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
c77d1076
Commit
c77d1076
authored
8 months ago
by
rubegar
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parent
0389304a
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
cambio.py
+17
-0
17 additions, 0 deletions
cambio.py
with
17 additions
and
0 deletions
cambio.py
0 → 100644
+
17
−
0
View file @
c77d1076
import
csv
def
replace_commas
(
input_file
,
output_file
):
with
open
(
input_file
,
'
r
'
,
newline
=
''
)
as
infile
,
open
(
output_file
,
'
w
'
,
newline
=
''
)
as
outfile
:
reader
=
csv
.
reader
(
infile
)
writer
=
csv
.
writer
(
outfile
,
delimiter
=
'
;
'
)
for
row
in
reader
:
new_row
=
[
column
.
replace
(
'
.
'
,
'
,
'
)
for
column
in
row
]
writer
.
writerow
(
new_row
)
# Nombre del archivo CSV de entrada y salida
input_filename
=
'
confianza.csv
'
output_filename
=
'
confianza_final.csv
'
replace_commas
(
input_filename
,
output_filename
)
\ 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