Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
adega
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
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
Odair M.
adega
Commits
bd792a94
Commit
bd792a94
authored
7 years ago
by
Bruno Meyer
Browse files
Options
Downloads
Patches
Plain Diff
periodo_pretendido
parent
c69826f8
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
script/analysis/student_analysis.py
+12
-0
12 additions, 0 deletions
script/analysis/student_analysis.py
script/base/dataframe_base.py
+1
-1
1 addition, 1 deletion
script/base/dataframe_base.py
script/build_cache.py
+9
-4
9 additions, 4 deletions
script/build_cache.py
with
22 additions
and
5 deletions
script/analysis/student_analysis.py
+
12
−
0
View file @
bd792a94
import
pandas
as
pd
from
utils.situations
import
*
ANO_ATUAL
=
2018
SEMESTRE_ATUAL
=
1
def
average_ira
(
d
):
temp
=
d
.
dropna
(
subset
=
[
'
MEDIA_FINAL
'
])
temp
=
temp
[
temp
[
'
MEDIA_FINAL
'
]
<=
100
]
...
...
@@ -10,6 +14,14 @@ def average_ira(d):
ch_total
=
np
.
sum
(
temp
[
'
CH_TOTAL
'
])
*
100
return
(
aux
/
ch_total
)
def
periodo_pretendido
(
df
):
aux
=
df
.
groupby
([
"
MATR_ALUNO
"
,
"
ANO_INGRESSO
"
,
"
SEMESTRE_INGRESSO
"
])
students
=
{}
for
x
in
aux
:
print
(
x
[
0
][
0
]
+
"
:
"
+
x
[
0
][
1
]
+
"
"
+
x
[
0
][
2
])
students
[
x
[
0
][
0
]]
=
(
ANO_ATUAL
-
int
(
x
[
0
][
1
]))
*
2
+
SEMESTRE_ATUAL
-
int
(
x
[
0
][
2
])
+
1
return
students
def
ira_semestra
(
df
):
aux
=
ira_por_quantidade_disciplinas
(
df
)
for
matr
in
aux
:
...
...
This diff is collapsed.
Click to expand it.
script/base/dataframe_base.py
+
1
−
1
View file @
bd792a94
...
...
@@ -55,7 +55,7 @@ def fix_dataframes(dataframes):
clean_register
(
register
)
merged
=
pd
.
merge
(
history
,
register
,
how
=
'
right
'
,
on
=
[
'
MATR_ALUNO
'
])
#~ print(merged)
fix_situation
(
merged
)
# fix_admission(merged)
fix_evasion
(
merged
)
...
...
This diff is collapsed.
Click to expand it.
script/build_cache.py
+
9
−
4
View file @
bd792a94
...
...
@@ -37,10 +37,15 @@ def generate_degree_data(path, dataframe):
pass
def
generate_student_data
(
path
,
dataframe
):
print
(
aluno_turmas
(
dataframe
))
print
(
indice_aprovacao_semestral
(
dataframe
))
print
(
ira_por_quantidade_disciplinas
(
dataframe
))
print
(
ira_semestra
(
dataframe
))
#~ print(aluno_turmas(dataframe))
#~ print(indice_aprovacao_semestral(dataframe))
#~ print(ira_por_quantidade_disciplinas(dataframe))
#~ print(ira_semestra(dataframe))
#~ aluno_turmas(dataframe)
#~ indice_aprovacao_semestral(dataframe)
#~ ira_por_quantidade_disciplinas(dataframe)
#~ ira_semestra(dataframe)
periodo_pretendido
(
dataframe
)
pass
def
generate_student_list
(
path
):
...
...
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