Home > OS >  python program to generate a csv file where each column is a data of sinusoidal wave
python program to generate a csv file where each column is a data of sinusoidal wave

Time:03-04

The requirement is to generate a csv file where each column is a data of sinusoidal wave of frequency 1 Hz,2 Hz, 3Hz, 4Hz, 5Hz, 6Hz, 7Hz. Thus total 7 columns.

100 wave points for 1Hertz and thus total 100 x 700= 70,000 points.

Can anyone explain how to code for this requirement

CodePudding user response:

You can try this. Here,

  1. I'm using Numpy to get required values for the frequency.
  2. Then copy these values to pandas dataframe
  3. And finally write it to csv file.

Please refer this enter image description here

  • Related