Skip to content

Instantly share code, notes, and snippets.

View csbailey5t's full-sized avatar

Scott Bailey csbailey5t

View GitHub Profile
UPDATE `omeka_users` SET `password`=sha1(concat(`salt`, 'NEW_PASSWORD')) WHERE `username`='USER';
#List unique values in a DataFrame column
pd.unique(df.column_name.ravel())
#Convert Series datatype to numeric, getting rid of any non-numeric values
df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True)
#Grab DataFrame rows where column has certain values
valuelist = ['value1', 'value2', 'value3']
df = df[df.column.isin(value_list)]