self.pathway_cost = random.uniform(301.2, 701.2) elif self.outcome_output == 10: self.pathway_time = 0 self.pathway_cost = random.uniform(24.1, 84.1) else: self.pathway_time = 0.28 self.pathway_cost = random.uniform(11.8, 15.8) return self.outcome_output, round(self.pathway_time, 2), round(self.pathway_cost, 1) def Creation(self): the_row = 500 the_column = 3 FakerData = np.zeros([the_row, the_column]) for i in range(the_row): Outcome, Time, Cost = MyProvider.FakeTimeAndCost(MyProvider) one_record = [Outcome, Time, Cost] # print (one_record) for j in range(the_column): FakerData[i][j] = one_record[j] np.savetxt('SimulatedData.csv', FakerData, delimiter=',') fake = Faker() fake.add_provider(MyProvider) # add this class to Faker fake.Creation()