0

I have generated the output using pandas. But, the same need to be implemented using numpy. The purpose to use numpy is it have more dynamic. Can any one please help me on implementing in numpy.

I have read the excel file and converted in to array using df = np.array(df)

  1. Need to remove the nan value from excel
  2. Need to format the rows in to column for Project

Input file:

input file

Output File:

output file

Need to do in NUMPY

tdy
  • 36,675
  • 19
  • 86
  • 83
RSD
  • 27
  • 4
  • Why not do the data manipulation in pandas and just save it as numpy at the end? This type of data wrangling is what pandas is designed for, not numpy. – tdy Mar 28 '21 at 05:41
  • `pandas` is basically `numpy` under the hood. If you are able to solve the question with `pandas`, which in this case would be more intuitive as you are dealing with excels, why do you want to complicate it with using pure `numpy` methods? – Mayank Porwal Mar 28 '21 at 05:45
  • The purpose to go for numpy is that we need to covert the excel into x,y,z axis. So when we may get any new column it will dynamically take the column and we need not hardcode the column. for col in df.columns[:-1]: print("Column Name : ", col) df[col] = df[col].ffill() And have used for loop, which triggers in every cell and it will take time to fetch data when its huge. So, i have preferred to go for numpy. And, it has been suggest by my team to go for numpy – RSD Mar 28 '21 at 06:40

0 Answers0