If you would analyse the Network tab for that page loading, you would notice an api being accessed via an XHR call, pulling this data into page. A more elegant way of obtaining that data - all 52 rows - would be:
import requests
import pandas as pd
headers = {
'Content-Type': 'application/json'
}
url = 'https://whalewisdom.com/filer/holdings?id=berkshire-hathaway-inc&q1=-1&type_filter=1,2,3,4&symbol=&change_filter=&minimum_ranking=&minimum_shares=&is_etf=0&sc=true&sort=current_mv&order=desc&offset=0&limit=99'
r = requests.get(url, headers=headers)
print(r.json())
df = pd.DataFrame(r.json()['rows'])
print(df[:10])
This would return:
|
symbol |
permalink |
security_type |
name |
sector |
industry |
current_shares |
previous_shares |
shares_change |
position_change_type |
percent_shares_change |
current_ranking |
previous_ranking |
current_percent_of_portfolio |
previous_percent_of_portfolio |
current_mv |
previous_mv |
stock_id |
percent_ownership |
quarter_first_owned |
quarter_id_owned |
source_type |
source_date |
filing_date |
avg_price |
recent_price |
quarter_end_price |
id |
0 |
AAPL |
aapl |
SH |
Apple Inc |
INFORMATION TECHNOLOGY |
COMPUTERS & PERIPHERALS |
8.90923e+08 |
8.87136e+08 |
3.78786e+06 |
addition |
0.427 |
1 |
1 |
42.2022 |
47.5985 |
1.55564e+11 |
1.57529e+11 |
195 |
5.50456 |
Q1 2016 |
61 |
13F |
2022-03-31 |
2022-05-16 |
36.6604 |
166.13 |
174.61 |
|
1 |
BAC |
bac |
SH |
Bank of America Corp. (North Carolina National Bank) |
FINANCE |
BANKS |
1.0101e+09 |
1.0101e+09 |
0 |
|
0 |
2 |
2 |
11.2953 |
13.5788 |
4.16363e+10 |
4.49394e+10 |
205 |
12.5371 |
Q3 2017 |
67 |
13F |
2022-03-31 |
2022-05-16 |
25.5185 |
33.64 |
41.22 |
|
2 |
AXP |
axp |
SH |
American Express Co |
FINANCE |
CONSUMER FINANCE |
1.51611e+08 |
1.51611e+08 |
0 |
|
0 |
3 |
3 |
7.69125 |
7.4946 |
2.83512e+10 |
2.48035e+10 |
368 |
20.1326 |
Q1 2001 |
1 |
13F |
2022-03-31 |
2022-05-16 |
39.311 |
155.43 |
187 |
|
3 |
CVX |
cvx |
SH |
Chevron Corp. (Standard Oil of California) |
ENERGY |
INTEGRATED OIL & GAS |
1.59178e+08 |
3.8245e+07 |
1.20933e+08 |
addition |
316.206 |
4 |
9 |
7.03142 |
1.3561 |
2.5919e+10 |
4.48806e+09 |
214 |
8.10144 |
Q4 2020 |
80 |
13F |
2022-03-31 |
2022-05-16 |
125.342 |
155.36 |
162.83 |
|
4 |
KO |
ko |
SH |
Coca Cola Co. |
CONSUMER STAPLES |
BEVERAGES |
4e+08 |
4e+08 |
0 |
|
0 |
5 |
4 |
6.72786 |
7.1563 |
2.48e+10 |
2.3684e+10 |
386 |
9.22716 |
Q1 2001 |
1 |
13F |
2022-03-31 |
2022-05-16 |
27.1275 |
63.92 |
62 |
|
5 |
OXY |
oxy |
SH |
Occidental Petroleum Corp. |
ENERGY |
INTEGRATED OIL & GAS |
2.26119e+08 |
2.20232e+08 |
5.88762e+06 |
addition |
2.6734 |
6 |
999999 |
3.57628 |
nan |
1.31828e+10 |
1.21326e+10 |
442 |
24.1274 |
Q1 2022 |
85 |
4 |
2022-05-02 |
2022-05-04 |
nan |
60.99 |
nan |
|
6 |
KHC |
khc |
SH |
Kraft Heinz Co. (The) |
CONSUMER STAPLES |
FOOD PRODUCTS |
3.25635e+08 |
3.25635e+08 |
0 |
|
0 |
7 |
5 |
3.4797 |
3.5323 |
1.28268e+10 |
1.16903e+10 |
178038 |
26.6052 |
Q3 2015 |
59 |
13F |
2022-03-31 |
2022-05-16 |
75.4858 |
37.34 |
39.39 |
|
7 |
MCO |
mco |
SH |
Moodys Corp |
FINANCE |
GENERAL FINANCE |
2.46698e+07 |
2.46698e+07 |
0 |
|
0 |
8 |
6 |
2.25813 |
2.9114 |
8.32383e+09 |
9.63552e+09 |
2707 |
13.3712 |
Q1 2001 |
1 |
13F |
2022-03-31 |
2022-05-16 |
13.7106 |
309.92 |
337.41 |
|
8 |
USB |
usb |
SH |
U.S. Bancorp (First National Bank of Cincinnati) |
FINANCE |
BANKS |
1.26418e+08 |
1.26418e+08 |
0 |
|
0 |
9 |
8 |
1.82279 |
2.1456 |
6.71911e+09 |
7.10089e+09 |
471 |
8.50875 |
Q1 2006 |
21 |
13F |
2022-03-31 |
2022-05-16 |
40.0713 |
47.66 |
53.15 |
|
9 |
ATVI |
atvi |
SH |
Activision Blizzard Inc |
INFORMATION TECHNOLOGY |
SOFTWARE |
6.43152e+07 |
1.46581e+07 |
4.96571e+07 |
addition |
338.769 |
10 |
24 |
1.39774 |
0.2947 |
5.15229e+09 |
9.75205e+08 |
11336 |
8.2257 |
Q4 2021 |
84 |
13F |
2022-03-31 |
2022-05-16 |
72.9554 |
80.59 |
80.11 |
|