'How can i put some information from a device to another device based on a parity condition?
I have to solve a problem at work in pandas where i have a .csv file where i have some information like this:
Element --- Ticket
1-X1211 --- TT0045
1-X1212
I have 2 elements that form a pair based on 2 conditions:
- The first 6 characters have to be the same for both of the elements in the pair.
- The last number forms a pair like this 1 with 2, 3 with 4, 5&6, 7&8, 9&0. In this case you can see the pair: 1-X1211 pair with 1-X1212.
What i need to do is to associate the ticket from an element of the pair to the other element in the pair (if a ticket exists in the first place). So in this case to copy the ticket from 1-X1211 -> TT0045 and put it on the other element of the pair 1-X1212. Final it should look like this:
Element
1-X1211 --- TT0045
1-X1212 --- TT0045
I can't share a code because i don't know how to do it.
Thank you, Iulia
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
