SEO Crawl Analysis Template : question #283
Replies: 1 comment 9 replies
-
I forgot to mention, if I run the widget code in python interpreter, it returns this line : but I can't run it in Jupyter... |
Beta Was this translation helpful? Give feedback.
-
Hello Elias, I wished I could contact you through mail but for some reasons I can't DM people on twitter.
So here I am and ask you a little help on your great tool and more specifically on https://www.kaggle.com/code/eliasdabbas/seo-crawl-analysis-template
I've been watching your video https://youtu.be/IZUBvDfDbqo
and I would like to make the code works with the following interactive tool :
![image](https://private-user-images.githubusercontent.com/21228346/241892420-e3602f7f-2b47-4c0a-8b36-b5b475bd92fe.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk2MTk1ODksIm5iZiI6MTcxOTYxOTI4OSwicGF0aCI6Ii8yMTIyODM0Ni8yNDE4OTI0MjAtZTM2MDJmN2YtMmI0Ny00YzBhLThiMzYtYjViNDc1YmQ5MmZlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI5VDAwMDEyOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk1ZTQ2NTQyY2E5ZjQ3M2IzMTUzYjhmZDExNTUyNzBiY2E4MzEzMjU4OTVmOTIyN2U5OGU3OTY4YzNjMGIxZTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.PB9rgr-OKHG7zHg2mbaOed8txQGIXW0EvvGJVmEEIXQ)
In Jupyter notebook, when you execute the code :
def count_column_values(col_name, show_top=10, sort_others=False):
series = crawl_df[col_name].str.split('@@').explode()
print(f'Number of {series.name}s: {series.count():,}')
print(f'Number of pages: {len(crawl_df):,}')
print(f'{series.name}s per page: {series.count()/len(crawl_df):.2f}')
display(value_counts_plus(series, sort_others=sort_others, dropna=False, show_top=show_top))
widgets.interact(count_column_values,
col_name=crawl_df.select_dtypes('object').columns,
show_top=widgets.IntSlider(min=1, max=50, value=10));
it returns a line partially hidden like this :
![image](https://private-user-images.githubusercontent.com/21228346/241892833-40546a24-d861-4fb5-bc3c-c86adb463ac1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk2MTk1ODksIm5iZiI6MTcxOTYxOTI4OSwicGF0aCI6Ii8yMTIyODM0Ni8yNDE4OTI4MzMtNDA1NDZhMjQtZDg2MS00ZmI1LWJjM2MtYzg2YWRiNDYzYWMxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI5VDAwMDEyOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEzODZhMTlkNWNkMjczZDA5NmIwNmQ4NWJjYzRjZDhlNmU1Mjc3NjAyYzRiODY1MzI1OGY4ZWY4MzQxOTM4M2UmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0._MyLER3bZaD0_iDnVxLhttO7UOJ8piztiU5QhocdeE8)
So my question is, how do I get the interactive code like in your video please?
Thanks a lot for your great work!!
Beta Was this translation helpful? Give feedback.
All reactions