3 Flashcards
VC: The most senior person in a VC firm is called a
managing director or general partner.
VC: The managing director or general partner
make the final decision on which companies to invest in and sit on the board of directors for the companies they invest in.
HostGator: To allow remote sql connections
Click “Remote MySQL” and enter the IP address of the computer you want to allow.
HostGator: To create a database, a new user, and give permissions
click “MySQL Database Wizard” and go through it.
HostGator: To upload a csv
Click on desired db, then click on import tab. Select the csv. Choose the csv file format, then if necessary, click checkbutton for “first line contains table columns”
DB: A simple DB is called
sqlite
Windows: To create a new file, type
echo.>file_name.py
Windows: To see current directory, type
echo %cd%
Windows: To change directory, type
cd c:/users/alen.solomon/desktop
Windows: To list all the files in current directory, type
dir /b
Pandas: Non printable characters can cause a “ValueError: No columns to parse from file” and can be fixed by
adding the parameter encoding=”utf-16” to read_csv
Adwords: When exporting a report from adwords, make sure not to use
Excel.csv format
Pandas: To choose a delimiter for read_csv, type
sep=”\t”
Pandas: To turn an excel file to a df, type
xl = pandas.ExcelFile("path/to.xlsx") df = xl.parse("Sheet name")
Pandas: To change column values with a dollar sign to a float, type
df[“Cost”] = df[“Cost”].apply(lambda x: str(x).strip(“$”)).astype(float)
Pandas: When you use df[“Column name”].apply(my_function)
the function name does not need to end with ()
Pandas: To return only certain columns of a df in a set order, type
df = df.ix[ :, [“Abbrev”,”Jan”,”Feb”,”Mar”,”Total”]]
Pandas: To replace all nans with something, type
df[“Column name”].fillna(“Replacement”, inplace=True)
Pandas: To write a couple dfs to two sheets in excel, type
writer = pandas.ExcelWriter(‘/users/student/desktop/demo.xlsx’, engine=’xlsxwriter’)
df. to_excel(writer, index=False, sheet_name=’Sheet1’)
df2. to_excel(writer, index=False, sheet_name=’Sheet2’)
writer. save()
Windows: To clear the cmd screen, type
CLS
Numpy: To turn a numpy array into a matrix, type
my_numpy_array.reshape(5,5)
Note: the dimensions are the 5,5
Numpy: To create a boolean index matrix from two numpy matrices, type
my_numpy_matrix
Numpy: To turn a numpy matrix back into an array, type
my_numpy_matrix.ravel()
Selenium: To import selenium, type
from selenium import webdriver