Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-dfs
csst-dfs-commons
Commits
bf6b5596
Commit
bf6b5596
authored
Jul 01, 2024
by
Wei Shoulin
Browse files
filter dup col
parent
675acede
Pipeline
#5936
passed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
csst_dfs_commons/models/__init__.py
View file @
bf6b5596
...
@@ -56,7 +56,14 @@ class Request(dict):
...
@@ -56,7 +56,14 @@ class Request(dict):
@
staticmethod
@
staticmethod
def
from_tuple
(
data
:
tuple
,
columns
:
tuple
):
def
from_tuple
(
data
:
tuple
,
columns
:
tuple
):
return
Request
.
from_dict
(
dict
(
zip
(
columns
,
data
)))
columns_new
=
[]
for
col
in
columns
:
if
col
in
columns_new
:
columns_new
.
append
(
"%s_1"
%
(
col
,
))
else
:
columns_new
.
append
(
col
)
return
Request
.
from_dict
(
dict
(
zip
(
columns_new
,
data
)))
@
staticmethod
@
staticmethod
def
from_list
(
data
:
list
,
columns
:
tuple
):
def
from_list
(
data
:
list
,
columns
:
tuple
):
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment