I need to generate a two column and 21 row file with random values using file operations and random method in Python.
Example
Num0 0.283740 Num1 0.394882 Num3 0.384844
Read in the file, output the two columns in ascending order of random values Identify the min, max, median, mean of the values
must use the random.random() method
so far, I have:
import numpy as np
import pandas as pd
mylist = pd.DataFram(np.random.randomint(0,100,size=21,1)),
columns=list(' '))
mylist
Aucun commentaire:
Enregistrer un commentaire