title: Iterate through a pandas dataframe, check each column value with an if statement and pass the column values to the prefered column of an empty df
body: <p>I have pandas a dataframe like this </p>
  
  <pre><code>    Event_Id       Investigation_Type Accident_Number   Event_Date      
  0   20180922X71035  ACCIDENT          DCA18CA289        09/10/2018  
  1   20180507X00658  ACCIDENT          DCA18CA169        05/07/2018  
  4   20171212X50255  ACCIDENT          DCA18CA043B       12/03/2017
  </code></pre>
  
  <p>and I try to iterate through it like this...</p>
  
  <pre><code>n1col = 0
  n2col = 1
  
  for i in df.index:
      Node1=df.Event_Id
      for j in df.index:
          Node2=df.Event_Id
          if (Node1 != Node2):
              new_df.loc[j,n1col] = Node1
              new_df.loc[j,n2col] = Node2
  </code></pre>
  
  <p>I don't know if my approach is right (as I see it's not) I want some help so I can get a result like the one below...</p>
  
  <p>I am new to that kind of stuff so I need your help.</p>
  
  <pre><code>    Node_1          Node_2 
  0   20180922X71035  20180507X00658
  1   20180922X71035  20171212X50255
  2   20180507X00658  20180922X71035
  3   20180507X00658  20171212X50255
  4   20171212X50255  20180922X71035
  6   20171212X50255  20180507X00658
  </code></pre>
  
  <p>Thanks in Advance.</p>