I am utilizing the following role to determine near- and next-term alternatives to replicate the VIX index. In which method it offers me the error message when I shot to use the role onto mine dataframe.

You are watching: Zero-size array to reduction operation maximum which has no identity

Here a link to the complete error code complete Error Code.

What might be the reason that it provides mit this worth error? as you can see I confirm if the password works until I use the role and yes, that does. Miscellaneous is wrong with the function f yet I have no clue...

def f(group): job = np.array(group<'Days'>) sigma2 = np.array(group<'sigma2'>) if days.min() T1>.min() sigma_T1 = sigma2<0> sigma_T2 = sigma2<0> return pd.DataFrame(<'T1' : T1, 'T2' : T2, 'sigma2_T1' : sigma_T1, 'sigma2_T2' : sigma_T2>) two_sigmas = sigma2.reset_index().groupby('Date').apply(f)####.groupby(level = 'Date').first() two_sigmas.head()
8 comments
share
save
hide
report
100% Upvoted
This subject is archived
New comments can not be posted and votes cannot be cast
Sort by: best

*

level 1
· 7m
From the error message, it seems that days T1> is north (so days should only have facets with the same value). Have actually you checked what days and also T1 are prior to that line?


2
Share
ReportSave
level 2
Op · 7m

I'm pretty brand-new to coding and Python so excuse me because that asking...

but work is firstly identified within the function. So if I placed the hashtag before .apply(f), job is actually no defined, yet.

See more: The North Face Summit Series Gore-Tex Jacket, Summit Series

How deserve to I number out why days T1> is empty?


1
Share
ReportSave
Continue this thread 


More short articles from the learnpython community
Continue browsing in r/learnpython

*

r/learnpython
Subdiscoverhotmail.com for posting questions and asking for general advice about your python code.
556k
Members


636

Online


Created Oct 2, 2009
Join
*
*
*
*

*

Top articles february 11th 2021Top articles of february, 2021Top articles 2021
helpdiscoverhotmail.com coinsdiscoverhotmail.com premiumdiscoverhotmail.com gifts
aboutcareerspressadvertiseblogTermsContent policyPrivacy policyMod policy
Back come Top