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 | |
class ChainedAssignent: | |
""" Context manager to temporarily set pandas chained assignment warning. Usage: | |
with ChainedAssignment(): | |
blah | |
with ChainedAssignment('error'): |
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
def running_on_local(): | |
return not running_on_domino() | |
def running_on_domino(): | |
return ( domino_run_id() is not None ) | |
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 matplotlib.pyplot as plt | |
import numpy as np | |
x = np.random.exponential(size=5000) | |
y = [ pow(x_,0.2654) for x_ in x] | |
plt.hist(y,bins=51) | |
plt.show() |
OlderNewer