Question: > > > import numpy as np > > > np _ data = np . random.rand ( 1 0 , 1 0 ) >

>>> import numpy as np
>>> np_data = np.random.rand(10,10)
>>> import pandas as pd
>>> pd_data = pd.DataFrame(np_data)
>>> print(pd_data)
012...789
00.8026940.8671190.265025...0.6447150.5766920.434311
10.5347300.1896260.076416...0.0943610.9763290.002688
20.3804280.7909960.945449...0.7318800.4533850.911732
30.2701640.2502770.169061...0.3992220.8047630.704296
40.0510090.2907860.980259...0.1430690.3093890.442810
50.7257830.6898110.475492...0.9714870.2691810.670401
60.6914820.5211960.080123...0.0721010.7197310.832809
70.2442010.6793900.436420...0.5758820.5441890.125840
80.6835850.3537970.398468...0.6508640.3487250.580165
90.3554280.0713940.032005...0.4231080.6720370.851583
[10 rows x 10 columns]
***slice the sub-DataFrame of 1st-5th rows, 6th-10th columns of pd_data, and name it as subdf (subdf should be a 5x5 dataframe). Print out subdf.***

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!