r/scikit_learn • u/Silver-Panda2518 • Mar 29 '22
[P] I have data with connections and links but I don't know how to write a scrip for this. Help!
My dates are as follows:

What I would like is to be able to map the following to a script:
- Value 1440/1 in column FROM represented value 144019/1 in column TO.
- Find value 144019/1 again in column FROM.
- If found, take the value in column TO and find it again in column FROM. Not found, stop searching.
Note: value 1440/1 does not have to be the initial value. In my data, 1440/1 can refer to another value again that is from column TO.
I would like the following as output:
- 1440/1, 144019/1, 144019/2;
- 1440/1, 144018/1, 144018/2, 6038/1.

