-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
larger raw file for testing adjust_rub() function #3
Labels
Milestone
Comments
epogrebnyak
changed the title
test suite
larger raw file for testing adjust_rub() function
Aug 19, 2019
Code to be tested and speed checked: Lines 9 to 36 in 0f02c77
|
Code for showing run times: def canonic_df(df):
"""Преобразовать данные внтури датафрейма:
- Привести все строки к одинаковым единицам измерения (тыс. руб.)
- Убрать неиспользуемые колонки (date_revised, report_type)
- Новые колонки:
* короткое название компании
* три уровня кода ОКВЭД
* регион (по ИНН)
"""
df_ = add_okved_subcode(add_region(add_title(df)))
df_ = rename_rows(df_)
df_ = adjust_rub(df_)
return df_[canonic_columns()].set_index('inn')
print("obtaining source...")
root_df0 = boo.main.read_intermediate_df(2017)
print("canonic_df(df)")
df = root_df0.copy()
%timeit canonic_df(df)
print("columns")
df = root_df0.copy()
%timeit add_okved_subcode(add_region(add_title(df)))
print("adjust rub")
df = root_df0.copy()
%timeit adjust_rub(df)
print("renaming")
df = root_df0.copy()
%timeit rename_rows(df) |
|
Remaining questions branched to #13. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Сделать более крупный файл для теста с помощью csvki (например, 10+ 10+ 50 рядов)
The text was updated successfully, but these errors were encountered: