0

I have the following dataset. I want to extract the data corresponding to the 3 lines indicated by the arrows separately. image1

Since I can't post the data file, I hope the image is enough to illustrate my problem.

Blockquote

Ali
  • 1
  • 2
  • 2
    A dummy working example would be really useful to understand what you've done so far and how to improve it. – Giovanni Frison Mar 30 '21 at 13:07
  • Does this answer your question? [How to select rows from a DataFrame based on column values](https://stackoverflow.com/questions/17071871/how-to-select-rows-from-a-dataframe-based-on-column-values) – albert Mar 30 '21 at 13:23
  • @albert yes and no. The problem is, when I select rows with positive slope and high R value I get both lines with positive slope. I want to separate them. Get each one alone. – Ali Mar 30 '21 at 13:28
  • You should definitely provide some sample data and an [MCVE](https://stackoverflow.com/help/minimal-reproducible-example) to make helping you easier. In addition, please show what's the desired output and the output you get at the moment. – albert Mar 30 '21 at 13:37
  • Thanks for the answer @albert. I have reduced my problem to its origin and posted an image of what I want to extract from my dataset. I will avoid posting my code to not further complicate things. Unfortunately, I can't post the data file. Please bear with me I'm new to posting here. – Ali Mar 30 '21 at 14:44
  • You should not directly post your code but rather reduce it to the absolute necessary parts in order to provide a snippet we can use as a basis (a so called [MCVE](https://stackoverflow.com/help/minimal-reproducible-example)). In addition, a sample snippet of your data would be really helpful. I do not need to post the complete dataset. A representative snippet containing both positive and negative slopes would be enough. – albert Mar 30 '21 at 15:25
  • Are you able to calculate the slope for your data? Before editing your post, you mentioned that you were able to add the slope to the data frame. So, the problem you try to solve looked like a filtering-related issue on a dataframe. Please clarify what you have tried so far, what you got and were you are stuck exactly. Otherwise we could only guess and are not able to help/support you properly. – albert Mar 30 '21 at 15:28

0 Answers0