Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
co2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
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
Container 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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tools
co2
Commits
1fb0632a
Verified
Commit
1fb0632a
authored
11 months ago
by
Ruben van Dijk
Browse files
Options
Downloads
Patches
Plain Diff
support multiple files.
parent
03ae64f3
Branches
Branches containing commit
No related tags found
No related merge requests found
Checking pipeline status
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
generate.py
+11
-1
11 additions, 1 deletion
generate.py
input/2024-05-14T14:28:58.csv
+0
-0
0 additions, 0 deletions
input/2024-05-14T14:28:58.csv
with
11 additions
and
1 deletion
generate.py
+
11
−
1
View file @
1fb0632a
import
glob
import
os
import
pandas
as
pd
import
matplotlib.pyplot
as
plt
import
plotly.tools
as
tls
#"off":"dicht", 'on':"open"
df
=
pd
.
read_csv
(
r
"
input/input.csv
"
)
all_files
=
glob
.
glob
(
os
.
path
.
join
(
"
input
"
,
"
*.csv
"
))
li
=
[]
for
filename
in
all_files
:
df
=
pd
.
read_csv
(
filename
,
index_col
=
None
,
header
=
0
)
li
.
append
(
df
)
df
=
pd
.
concat
(
li
,
axis
=
0
,
ignore_index
=
True
)
df
.
drop_duplicates
(
inplace
=
True
)
df
[
'
datetime
'
]
=
pd
.
to_datetime
(
df
[
'
datetime
'
])
raam
=
df
[
df
[
'
metadata_id
'
]
==
420
].
drop
(
columns
=
'
metadata_id
'
)
raam
=
raam
.
set_index
(
raam
[
'
datetime
'
])
...
...
This diff is collapsed.
Click to expand it.
input/
input
.csv
→
input/
2024-05-14T14:28:58
.csv
+
0
−
0
View file @
1fb0632a
File moved
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