Skip to content
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

Income Statement trả về trùng lặp columns #132

Open
yellow1912 opened this issue Jul 6, 2024 · 4 comments
Open

Income Statement trả về trùng lặp columns #132

yellow1912 opened this issue Jul 6, 2024 · 4 comments
Labels
enhancement Worth fixing to enhance the user's experience

Comments

@yellow1912
Copy link

Mình đang dùng bản mới nhất vnstock3 (tính đến thời điểm post lỗi này)

Các cột sau bị trùng

'Minority Interest', 'Dividends received', 'Provision for credit losses', 'Financial Income', 'Interest Expenses', 'Net Sales', 'Gross Profit', 'Financial Expenses', 'General & Admin Expenses', 'Operating Profit/Loss', 'Selling Expenses'

Index(['ticker', 'yearReport', 'lengthReport', 'Minority Interest',
       'Minority Interest', 'Net Profit/Loss before tax', 'Dividends received',
       'Dividends received', 'Provision for credit losses',
       'Provision for credit losses', 'Revenue YoY (%)', 'Revenue (Bn. VND)',
       'Attribute to parent company (Bn. VND)',
       'Attribute to parent company YoY (%)', 'Financial Income',
       'Financial Income', 'Interest Expenses', 'Interest Expenses',
       'Net Sales', 'Net Sales', 'Gross Profit', 'Gross Profit',
       'Financial Expenses', 'Financial Expenses', 'General & Admin Expenses',
       'General & Admin Expenses', 'Operating Profit/Loss',
       'Operating Profit/Loss', 'Net income from associated companies',
       'Other Income/Expenses', 'Cost of Sales', 'Selling Expenses',
       'Selling Expenses', 'Sales', 'Sales deductions',
       'Gain/(loss) from joint ventures', 'Other income',
       'Net other income/expenses', 'Interest and Similar Income',
       'Interest and Similar Expenses', 'Net Interest Income',
       'Fees and Comission Income', 'Fees and Comission Expenses',
       'Net Fee and Commission Income',
       'Net gain (loss) from foreign currency and gold dealings',
       'Net gain (loss) from trading of trading securities',
       'Net gain (loss) from disposal of investment securities',
       'Net Other income/(expenses)', 'Other expenses',
       'Net Other income/expenses', 'Total operating revenue',
       'Operating Profit before Provision', 'Profit before tax',
       'Tax For the Year', 'Business income tax - current',
       'Business income tax - deferred', 'Net Profit For the Year',
       'Attributable to parent company', 'EPS_basis'],
      dtype='object')
@yellow1912
Copy link
Author

Việc trùng lặp này xảy ra với nhiều reports khác ví dụ balance_sheet

@thinh-vu
Copy link
Owner

thinh-vu commented Jul 8, 2024

Chào @yellow1912,
Cám ơn bạn đã báo lỗi.
Bạn cho mình xin thêm các trường hợp lỗi cụ thể với các báo cáo mà bạn gặp thông tin lặp này nhé.
Thực tế thì có những trường hợp tên cột giống nhau nhưng dữ liệu khác nhau (có quan hệ mục theo dạng cha-con) do đó mình không loại bỏ trùng ngay từ đầu.
Phần này mình sẽ cần nghiên cứu thêm và đánh giá dựa trên các trường hợp mẫu cụ thể để xác định hướng cải thiện cho các phiên bản tới.

@thinh-vu thinh-vu added the enhancement Worth fixing to enhance the user's experience label Jul 8, 2024
@yellow1912
Copy link
Author

Thực ra trên ví dụ của bạn cũng đã cho thấy việc bị lặp này, ví dụ

https://colab.research.google.com/github/thinh-vu/vnstock/blob/main/docs/1_vietnam_stock_vnstock3.ipynb#scrollTo=YbyOAOjy6Nfg

image

Nếu cột giống nhau nhưng dữ liệu khác nhau thì làm sao để biết cột nào là dữ liệu nào nhỉ? Phần cashflow này cũng không thấy quan hệ cha con.

@thinh-vu
Copy link
Owner

thinh-vu commented Oct 6, 2024

Lỗi lặp cột này xuất hiện do tên tiêu chí giống nhau nhưng được đặt tên mã khác nhau tuỳ theo loại hình công ty (chứng khoán, ngân hàng, bảo hiểm, cty thông thường). Khi dịch từ tên mã sang tên tự nhiên tạo ra các tên cột trùng nhau. Trong các cột trùng tên, cột nào chứa dữ liệu thì đó là cột hợp lệ. Mình sẽ xử lý thêm lỗi này.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Worth fixing to enhance the user's experience
Projects
None yet
Development

No branches or pull requests

2 participants