If you need to check if all columns of a DataFrame are equal to a given value, use the DataFrame.eq() method. main.py import pandas as pd df = pd.DataFrame({ 'a': [1, 1, 1], 'b': [1, 1, 1], }) value = 1 # a True # b True # dtype: bool print(df.eq(value).al...
def check_bounds(bounds, n): if bounds is None: return if n != bounds.shape[0]: raise ValueError( "The number of rows of the bounds array is not equal to the number of asset." ) if 2 != bounds.shape[1]: raise ValueError( "The number of columns the bounds array should be equa...
"""Test if data segment e is good according to reject and flat. Expand Down Expand Up @@ -4631,7 +4631,7 @@ def make_fixed_length_epochs( reject_by_annotation=True, proj=True, overlap=0.0, id=1, id=1, # noqa: A002 verbose=None, ): """Divide continuous raw data into equal-...
" in PEP 484. If you are not interested in static type checking, you can use them anyway. A future version will likely convert them such that they result in types. The@tc.typecheckdecorator will effectively modify the Python-visible signature of the decorated function: Essentially, the ...