Skip to content

Commit

Permalink
reformat docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
eliasdabbas committed Jan 17, 2018
1 parent 22b1303 commit d0211ff
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions advertools/kw_generate.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@

from itertools import permutations

import pandas as pd

def kw_generate(products, words, max_len=3, match_types=['Exact', 'Phrase', 'Broad'],
campaign_name='SEM_Campaign'):
"""Generate a data frame of kewywords using a list of products and relevant words.
`products` will be used as the nams of the ad groups
`words` are any related words that make it clear that the user is interested in `products`
`max_len` is the maximum number of words to include in each permutation to product keywords
`match_types` can be restricted or kept as is based on preference
`campaign_name` name of campaign!
Parameters
----------
products : will be used as the names of the ad groups
words : related words that make it clear that the user is interested in `products`
max_len : the maximum number of words to include in each permutation of product keywords
match_types : can be restricted or kept as is based on preference
campaign_name : name of campaign
>>> products = ['bmw', 'toyota']
>>> words = ['buy', 'second hand']
Expand All @@ -20,6 +26,12 @@ def kw_generate(products, words, max_len=3, match_types=['Exact', 'Phrase', 'Bro
2 SEM_Campaign bmw bmw buy Broad
3 SEM_Campaign bmw bmw second hand Exact
4 SEM_Campaign bmw bmw second hand Phrase
Returns
-------
keywords_df : a pandas.DataFrame ready to upload
"""
headers = ['Campaign', 'Ad Group', 'Keyword', 'Criterion Type']
keywords_list = []
Expand Down

0 comments on commit d0211ff

Please sign in to comment.