This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import numpy as np | |
import re | |
''' | |
Size | |
''' | |
# Input | |
input_address = './DCM Lookup Table_Updated.xlsx' | |
output_address = './Size_Output.xlsx' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Spyder Editor | |
This is a temporary script file. | |
""" | |
import pandas as pd | |
import numpy as np | |
import re |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Created on Mon Oct 30 09:26:59 2017 | |
@author: yvette.wang | |
""" | |
import pandas as pd | |
import numpy as np | |
import re |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
df = pd.read_excel('./searchall.xlsx', sheetname='Sheet1') | |
df1 = df.copy() | |
print df1['Partner Type (Same)'].value_counts() | |
df1['Partner Type (Same)'] = df1['Partner Type (Same)'].fillna('Search') | |
print df1['Partner Type (Same)'].value_counts() | |
# df1['Partner Type (Same)'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import numpy as np | |
meta = pd.read_excel('./Search Lookup Table.xlsx') | |
meta['Raw file name'] = meta['Raw file name'].fillna(False) | |
meta['address'] = zip(meta['Country'], meta['file name']) | |
# meta | |
temp_col = meta.Template.unique() | |
# temp_col |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# replace 'temp = df[.......' | |
df.loc[df.Channel == 'Display-TrueView', ['Cost', 'Clicks']] = 0 # should be ['Cost', 'Clicks', ...., 'Video....'] | |
df.loc[df['Partner...'].isin([...])......, 'Cost'] = 0 | |
df.to_excel(...) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
add_input = './Desktop/DCM_output.xlsx' | |
sheet_name = 'Sheet1' | |
add_output2 = './Desktop/spendcleanoutput.xlsx' | |
df=pd.read_excel(add_input, sheetname=sheet_name) | |
df = df.dropna(how='all') | |
df.loc[df.Channel=='Display-TrueView',['Cost','Views','Clicks','Video played to 25%','Video played to 50%','Video played to 75%','Video played to 100%']] = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sphinx 1.4.6 | |
setuptools 27.2.0 | |
Babel 2.3.4 | |
argcomplete 1.0.0 | |
decorator 4.0.10 | |
mistune 0.7.3 | |
chest 0.2.3 | |
jupyter-client 4.4.0 | |
widgetsnbextension 1.2.6 | |
alabaster 0.7.9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
/usr/bin/anaconda/bin/pip install -r https://gist.githubusercontent.com/djfan/ccdfac26415196021adacb2d52455c60/raw/36e12d84a418d2274ef79b1d853073cc200535cc/r.txt | |
#/usr/bin/anaconda/bin/conda update --all | |
/usr/bin/anaconda/bin/conda install hdf4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
git clone https://github.com/djfan/magellan.git | |
cd magellan | |
git checkout mb/fix-pyspark-support | |
cd python | |
/usr/bin/anaconda/bin/python setup.py install | |
/usr/bin/anaconda/envs/py35/bin/python setup.py install |
OlderNewer