Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HYDWS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Indu
HYDWS
Commits
d0ecaf1c
Commit
d0ecaf1c
authored
11 months ago
by
Nicolas Schmid
Browse files
Options
Downloads
Patches
Plain Diff
fix: check if dataframe empty before dropping column
parent
ef3542a8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!44
fix: check if dataframe empty before dropping column
Pipeline
#3232
passed
11 months ago
Stage: codestyle
Stage: test
Stage: publish
Stage: deploy
Changes
1
Pipelines
4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hydws/routers/boreholes.py
+4
-1
4 additions, 1 deletion
hydws/routers/boreholes.py
with
4 additions
and
1 deletion
hydws/routers/boreholes.py
+
4
−
1
View file @
d0ecaf1c
...
@@ -167,7 +167,10 @@ async def get_section_hydraulics(borehole_id: uuid.UUID,
...
@@ -167,7 +167,10 @@ async def get_section_hydraulics(borehole_id: uuid.UUID,
db_result_df
=
await
crud
.
read_hydraulics_df
(
db_result_df
=
await
crud
.
read_hydraulics_df
(
section_oid
,
starttime
,
endtime
,
defer_cols
)
section_oid
,
starttime
,
endtime
,
defer_cols
)
db_result_df
=
db_result_df
.
dropna
(
axis
=
1
,
how
=
'
all
'
).
drop
(
columns
=
[
'
_oid
'
])
db_result_df
=
db_result_df
.
dropna
(
axis
=
1
,
how
=
'
all
'
)
if
'
_oid
'
in
db_result_df
.
columns
:
db_result_df
=
db_result_df
.
drop
(
columns
=
[
'
_oid
'
])
if
format
==
'
csv
'
:
if
format
==
'
csv
'
:
return
csv_response
(
db_result_df
)
return
csv_response
(
db_result_df
)
...
...
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