top of page

Python - www operations - advertools


We can analyze marketing productivity, keywords, searched data, tables, information by google, e.g. on wikipedia, audience, marketing text, URL structure, SEO, social, SEM, jsons, structured entities, facebook, text ads. Advertools python package is in 2021 an ideal choice, which can be included into corporate web analytics. %config InlineBackend.figure_format = 'retina'


import matplotlib.pyplot as plt


# install advertools package


pip install advertools


import advertools as adv


import pandas as pd


pd.set_option('display.max_columns', None)


# use google login


cx = 'YOUR_GOOGLE_CUSTOM_SEARCH_ENGINE_ID'

key = 'YOUR_GOOGLE_DEVELOPER_KEY'



# create data frames from wikipedia list and concatenate text information to sentences


top_US_banks = pd.read_html('https://en.wikipedia.org/wiki/List_of_banks_in_the_Americas', header=0)[0]


top_US_banks.head()


names = top_US_banks['Bank name'].tolist()


top_US_banks


names = top_US_banks['Bank name'].tolist()


names


assets= top_US_banks['Total assets (billions of US$)'].tolist()


combined_values = 'Assets of ' + top_US_banks['Bank name'].map(str) + ' are ' + top_US_banks['Total assets (billions of US$)'].map(str)+ '.'

combined_values



0 Assets of JPMorgan Chase & Co. are $2,622.53. 1 Assets of Bank of America are $2,354.51. 2 Assets of Citigroup Inc. are $1,917.38. 3 Assets of Wells Fargo & Co. are $1,895.88. 4 Assets of Royal Bank of Canada are $1,039.24. 5 Assets of Toronto-Dominion Bank are $1,006.00. 6 Assets of Goldman Sachs are $931.80. 7 Assets of Morgan Stanley are $853.53. 8 Assets of Scotiabank are $785.44. 9 Assets of Bank of Montreal are $613.56. 10 Assets of Canadian Imperial Bank of Commerce a... 11 Assets of U.S. Bancorp are $467.37. 12 Assets of Truist Financial are $441.24. 13 Assets of Banco Itaú are $401.10. 14 Assets of PNC Financial Services are $382.32.

dtype: object








15 views0 comments

Recent Posts

See All

Comments


bottom of page