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
#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)] |
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
""" | |
Bisection, Secant & Newton Raphson Method. | |
""" | |
import math | |
""" | |
* Variable Description: | |
* | |
* f : Given function | |
* f_ : Derivative of f |
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
""" | |
GET_SAS_AS_DASK.PY | |
2019-05-02 | |
kingfischer16 | |
Functionality to read SAS data from a SAS server (or locally) and return | |
dask.dataframe. | |
General idea: Using SASPY, build a list of pandas.DataFrames that are blocks | |
called via a SAS session. These blocks then make up the dask.DataFrame. Helper |