Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
changzheng_mark
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
EvilCalf
changzheng_mark
Commits
931bf772
Commit
931bf772
authored
Jul 14, 2022
by
EvilCalf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
65263dfd
Pipeline
#312
failed with stages
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
split.py
split.py
+37
-0
No files found.
split.py
0 → 100644
View file @
931bf772
import
numpy
as
np
import
pandas
as
pd
filename
=
"原始数据/人工标注.xlsx"
filepath
=
'人工标注/'
# filename = "原始数据/纯AI.csv"
# filepath='纯AI/'
df
=
pd
.
read_excel
(
filename
,
encoding
=
'gbk'
,
header
=
0
)
UID
=
''
cnt
=
[]
for
indexs
in
df
.
index
:
data
=
df
.
loc
[
indexs
]
.
values
uesr
=
data
[
0
]
studyID
=
data
[
1
]
seriesID
=
data
[
2
]
startTime
=
data
[
3
]
endTime
=
data
[
4
]
pos
=
data
[
5
]
typeID
=
data
[
6
]
typeNmae
=
data
[
7
]
if
UID
==
''
:
UID
=
seriesID
cnt
.
append
(
data
)
elif
UID
==
seriesID
:
cnt
.
append
(
data
)
elif
UID
!=
seriesID
:
output
=
pd
.
DataFrame
(
cnt
)
output
.
to_csv
(
filepath
+
str
(
UID
)
+
".csv"
,
encoding
=
'gbk'
,
header
=
[
"手机号码"
,
"检查编号"
,
"序列编号"
,
"开始时间"
,
"提交时间"
,
"影像结果"
,
"肺结节类型"
,
"肺结节类型 - Mapping"
])
UID
=
seriesID
cnt
=
[]
cnt
.
append
(
data
)
output
=
pd
.
DataFrame
(
cnt
)
output
.
to_csv
(
filepath
+
str
(
UID
)
+
".csv"
,
encoding
=
'gbk'
,
header
=
[
"手机号码"
,
"检查编号"
,
"序列编号"
,
"开始时间"
,
"提交时间"
,
"影像结果"
,
"肺结节类型"
,
"肺结节类型 - Mapping"
])
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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