I have an Excel file, but I'm having a hard time because there are more conditions than I thought to erase duplicate ones.
1. The data looks like this, but convert it into a csv file and load the file using Pandas Successfully changed to No.Pi data. Let's call this data.
2. Next, only rows with a value of 20180101 or higher and 20180630 or lower in the second column behind you are separate It was extracted using a function called np.delete (up to this point, the shape is (489, 8) So let's say the data created like this is data1.
3. After removing only the station column using the number-fi indexing function, We made up to idx using return_index=True using np.unique function. For example, since there are three ADJs in the first station, the first position is 0 and Next, there are three BBKs, so a 1d-array with the 3rd, the first position of the BBKs, is created. (The 1d-array thus made is 144 in length.) The 1d-array made like this is called idx.
4. Using idx, which contains unique location information, we created it through work 2 I want to extract the row of data1 separately. For example, if idx = [0,3,6,...] then the position of the row corresponding to the number of idx, that is, the 0th row of data1 Can you find the third row, the sixth row, etc., extract the information of the row and make it into the form of (144,8)?
I'd appreciate your help.python
Is this what you want?
© 2022 pinfo. All rights reserved.