I have a PlantUML sequence diagram where Alice exchanges messages with Cecil once and then only the communication with Bob happens. This flow causes the subjects are ordered by the time of their first interaction.
#startuml
Alice -> Cecil: hi
Cecil -> Alice: fu
Alice -> Bob: hi
Bob -> Alice : hello
Alice -> Bob: howdy?
Bob -> Alice: fine
Alice -> Bob: r u sure?
Bob -> Alice: ye
#enduml
It looks ugly - I want to avoid showing the interaction between Alice and Bob over Cecil.
How to assure a custom order of the subjects, i.e. Alice - Bob - Cecil?
I have found it out. Just use the keyword, participant. The order of generated participants follows the order of their definitions. Alternatively, it is possible to define the order explicitly (participant Alice order 1).
Source: UML Sequence Diagram: Participants
#startuml
participant Alice
participant Bob
participant Cecil
Alice -> Cecil: hi
Cecil -> Alice: fu
Alice -> Bob: hi
Bob -> Alice : hello
Alice -> Bob: howdy?
Bob -> Alice: fine
Alice -> Bob: r u sure?
Bob -> Alice: ye
#enduml
Related
I have an excel sheet where I have a record containing a travel request, but I need to process this out so I can see all the combinations I need to book.
The original record entry looks like this
ID Family Father Mother Children Destinations
KT1 Smith John Joan John,Mary London,New York
and I need the final result to look like this
ID Family Father Mother Children Destinations
KT1 Smith John Joan John London
KT1 Smith John Joan Mary London
KT1 Smith John Joan John New York
KT1 Smith John Joan Mary New York
(there may be multiple entries under any of the Children and destinations , and possibly other fields which would be needed as well )
I am really unsure of how to do this and would love some advice
Use PowerQuery.
Google its usage and where to find it if you're not familiar, a quick search will produce a lot of results ...
https://www.howtoexcel.org/power-query/the-complete-guide-to-power-query/
https://support.microsoft.com/en-us/office/create-load-or-edit-a-query-in-excel-power-query-ca69e0f0-3db1-4493-900c-6279bef08df4
From there, you can transform your data.
That will achieve your outcome with little to no fuss.
I have a platform tracking multiple customer and rep chats. I want to create data frames containing a single customer's entire, ordered chat history.
Here's a link to the example data
And for quick reference:
Convo Room Date Message Order User ID Role Chat contents
A1 3-Oct-17 1 JOHN CUSTOMER Hi, can you help?
A1 4-Oct-17 2 ALICE REP Sure, what's up?
A1 5-Oct-17 3 JOHN CUSTOMER I have warts.
A1 6-Oct-17 4 JOHN CUSTOMER Please don't hang up, it's just warts.
B1 7-Oct-17 1 JOHN CUSTOMER Hi, can YOU help?
B1 8-Oct-17 2 MARY REP Sure, I heard about Alice.
B1 9-Oct-17 3 MARY REP I also have warts.
B1 10-Oct-17 4 JOHN CUSTOMER Oh, nevermind then, gotta go.
C1 7-Oct-17 1 JIM CUSTOMER Hi, can you help?
C1 8-Oct-17 2 ALICE REP Maybe, what's up?
C1 9-Oct-17 3 JIM CUSTOMER Not warts.
C1 10-Oct-17 4 ALICE REP Good, that's the only thing I cannot handle.
D1 15-Oct-17 1 JOHN CUSTOMER Hi, pls help. Warts.
D1 16-Oct-17 2 JUDE REP Perfect, I cure them!
D1 17-Oct-17 3 JUDE REP …with fire.
D1 18-Oct-17 4 JUDE REP Are you still there? Dang, lost another one.
In my mind, the first step is to get the data ordered using pivot tables. Next, I can focus on separating chats into data frames for sentiment analysis or other metrics.
I believe I am close, but I keep getting one part of the sorting wrong.
What I have so far:
df = test.pivot_table(index=['Role', 'User ID', 'Date', 'Convo Room', 'Message Order'],columns=["Role"],aggfunc='first')
df.head()
Which returns the following:
Using Excel, I believe this is generally what I want though I'm certain there are many ways to visualize this:
You are in the right track , just need to make sure you pass the right column into pivot_table
df.pivot_table(index=[ 'User ID', 'Convo Room', 'Message Order'],columns=["Role"],values='Chat contents',aggfunc='first')
I am trying to format a table from one format to another utilizing a macro. Please see below for an example of what I am trying to do.
From this:
User_ID FNAME LNAME ROLE_ID
1 Bob Smith Role1
1 Bob Smith Role2
1 Bob Smith Role2.2
To this
User_ID FNAME LNAME ROLE_ID ROLE_ID2
1 Bob Smith Role1 Role2, Role2.2
So I have 5 different "role categories". For example, A, B, C, D are my categories. Each category can have multiple roles assigned to a user. I want to have 5 static columns that list the different role categories and what the user is assigned from each.
If this is possible, it would be helpful to understand where to start.
In Excel I am trying to return a name from a table in a second table when the Team Name matches. So if values from both arrays exist put the persons name next to each match of that item.
So in column Coach in this table.
Team Member Coach
Team C Aida NA
Team F Alana
Team A Anne
Team B Arun
Team F Bellinda
Team C Bill
Team A Charlie
Team F Daphne
Team E Eliza
Team B Esther
Team D Harry
Team D Lacy
Team C Lauren
Team D Laurie
Team B Mohammad
Team E Morgan
Team F Peter
Team A Sally
Team A Sammy
Team C Stephen
Team E Tiffany
Team D Tim
Team A Tom
Team E Tracy
Team F Wally
Return the coach that matches with the team from this list.
Teams Coach Coaches
Team A Sarah
Team E Sarah
Team F Brett
Team B Brett
Team C Nathan
Team D Theresa
So the first entry would be
Team Member Coach
Team C Aida Nathan
I have tried a variation of index match and if formula's and I just can't figure it. This is my last attempt.
=IF(ISNA(MATCH(E2:E7,A2:A26,0)),F2:F7,"NA")
So lets say that I have a table like this..
TID Person Type Name
1 Andy F Orange
2 Andy M Beef
3 Andy V Carrot
4 Andy V Spinach
5 Bobby M Ham
6 Bobby F Apple
7 Bobby V Carrot
I want to transpose it so that it will be sorted according to the Type, I want it to look like so
Person F M V
Andy Orange Beef Carrot
Bobby Apple Ham Carrot
How can I manage to do this? Oh, and I'll also point some stuff in case you guys missed it:
The Types have no particular order, if you notice Andy's, the order is F M V V, but Bobby's is M F V.
Multiple instances of Type may occur, just like in Andy's case, notice the double V. But even so, I want it so that the only V that counts is the first one, thats why in the transposed table, the V is Carrot, because the Carrot occurred first (the Spinach is ignored).
I dont know if I ask too much, but even just the gist of the solution would be very helpful for me. The main point of my question is to ask how can I transpose such unsorted items, whilst paying attention to the 1st point. The 2nd point is important too, but I can wait or ask later if you guys dont feel like answering.
Thanks for reading, please share me your knowledge.
The easisest/quickest way is to create a new column before the TID column which has this formula in it.
=[Person]&"_"&[Type]
For instance say your data started in column B, see screen shots (TID), then the first formula would be:
=C2&"_"&D2 and will result in Andy_F being created. Copy this down for all the names you have.
You should have something like this:
NEW TID Person Type Name
Andy_F 1 Andy F Orange
Andy_M 2 Andy M Beef
Andy_V 3 Andy V Carrot
Andy_V 4 Andy V Spinach
Bobby_M 5 Bobby M Ham
Bobby_F 6 Bobby F Apple
Bobby_V 7 Bobby V Carrot
Next, set up a table like this (using copy unique items, if necessary), with unique names on the vertical and Types along the horizontal:
F M V
Andy [form]
Bobby
Where [form] is a vlookup formula as in the screen shots below:
Resulting in the correct table for you, once the formula is copied to all cells in the new table:
Vlookup will grab the first item that matches its search critera, so multiple matches will be ignored.
The formula for Andy F in the table is VLOOKUP($G2&"_"&H$1,$A$2:$E$8,5,0), with the data as in the screen shots.
A better way might be to use VBA, but this should do the trick.