1
$\begingroup$

I've got a two column table (Fields, Methods) and I'd like to find which Methods relates to many Fields. Can I accomplish this task using Mathematica?

This are the sample data. https://jpst.it/L6I5

$\endgroup$
  • 1
    $\begingroup$ Use Tally[].. $\endgroup$ – Feyre Jul 21 '16 at 15:39
  • $\begingroup$ @Feyre: mmm... I look for something more similart to data mining I guess. $\endgroup$ – Revious Jul 22 '16 at 14:02
4
$\begingroup$

I'm not fully sure what you're asking for, but do these ideas help?

data = Import["https://justpaste.it/wiaz", "Data"][[1, 2]];

#[[1, 2]] -> #[[All, 1]] & /@ GatherBy[data, Last]

{
  "DrawOdds_Main(PrintPageEventArgs,Boolean)" -> 
    {"_drawMarkets", "_lastPrintedSport", "_noPrint", "_pageHeight", 
    "_pageIndex", "_pageWidth", "_personalTemplate", 
    "_previousPrintingStatus", "_printingStatus", "_printRows", 
    "_rowIndex", "_sportIndex", "_sports", "_tournamentPrintingData", 
    "Settings"}, 
  "AltreCondizioniDiStampa(List,List,Int32,PrintRowOrder)" -> 
    {"_rowIndex", "_tournamentPrintingData"}, 
  "Init(List,Dictionary<AggregateSport,List>)" -> 
    {"Settings", "_printDialog", "_printDocument", 
    "_personalTemplate", "_sports", "_printRows"}, 
  "InitPrinter()" -> 
    {"_printDocument", "_pageHeight", "_pageWidth", "_personalTemplate"}, 
  "InizializzaMisureTemplate(PersonalTemplate)" -> 
    {"_personalTemplate"}, 
  "Print(Int32)" -> 
    {"_printDialog", "_printDocument", "_printerSettingsToPage", "_printerSettingsFromPage"}, 
  "PrintPreview()" -> 
    {"_printerSettingsToPage", "_printerSettingsFromPage", "_pageIndex", 
    "_pageHeight", "_pageWidth"}, 
  "Reset()" -> 
    {"_rowIndex", "_sportIndex", "_noPrint", "_drawMarkets"}, 
  "UpdateNextPageParam(PrintPageEventArgs)" -> 
    {"_printerSettingsToPage", "_printerSettingsFromPage", 
    "_pageIndex", "_noPrint", "_drawMarkets"}, 
  "UpdatePrintingStatus(AggregateSport,List)" -> 
    {"_rowIndex", "_tournamentPrintingData", "_lastPrintedSport", 
    "_printingStatus", "_previousPrintingStatus"}
}

Alternatively you could use GroupBy[data, Last].

Or maybe you're wanting to visualize it as a network?

Graph[DirectedEdge @@@ Reverse /@ data, VertexLabels -> Placed["Name", Tooltip]]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.