Given a 1D numpy array values of length N, compute three series and stack them into a 2D array of shape (N, 3):
np.maximum.accumulate)Round to 4 decimals. Use np.column_stack or np.stack(axis=1) to assemble.
Ready to take your skills to the next level? Enroll in our comprehensive Data Analyst Career Track to master SQL, Python, Excel, and Power BI.
Run your code to see the result here.