code: def testEdgeDataFrames(self):
      g = Graph([(0, 1), (0, 2), (0, 3), (1, 2), (2, 4)])
  
      # No edge names, no attributes
      df = g.get_edge_dataframe()
      self.assertEqual(df.shape, (5, 2))
      self.assertEqual(list(df.index), [0, 1, 2, 3, 4])
      self.assertEqual(list(df.columns), ["source", "target"])
  
      # Edge names, no attributes
      g.es["name"] = ["my", "list", "of", "five", "edges"]
      df = g.get_edge_dataframe()
      self.assertEqual(df.shape, (5, 3))
      self.assertEqual(list(df.index), [0, 1, 2, 3, 4])
      self.assertEqual(list(df["name"]), g.es["name"])
      self.assertEqual(set(df.columns), {"source", "target", "name"})
  
      # No edge names, with attributes
      g = Graph([(0, 1), (0, 2), (0, 3), (1, 2), (2, 4)])
      g.es["weight"] = [6, -0.4, 0, 1, 3]
      df = g.get_edge_dataframe()
      self.assertEqual(df.shape, (5, 3))
      self.assertEqual(list(df.index), [0, 1, 2, 3, 4])
      self.assertEqual(set(df.columns), {"source", "target", "weight"})
      self.assertEqual(list(df["weight"]), g.es["weight"])
  
      # Edge names, with weird attributes
      g.es["name"] = ["my", "list", "of", "five", "edges"]
      g.es["weight"] = [6, -0.4, 0, 1, 3]
      g.es["source"] = ["this", "is", "a", "little", "tricky"]
      df = g.get_edge_dataframe()
      self.assertEqual(df.shape, (5, 5))
      self.assertEqual(list(df.index), [0, 1, 2, 3, 4])
      self.assertEqual(
          set(df.columns), {"source", "target", "name", "weight"}
      )
      self.assertEqual(list(df["name"]), g.es["name"])
      self.assertEqual(list(df["weight"]), g.es["weight"])
  
      i = 2 + list(df.columns[2:]).index("source")
      self.assertEqual(list(df.iloc[:, i]), g.es["source"])
  
imports: import gzip
  import io
  import unittest
  import warnings
  from igraph import Graph, InternalError
  from .utils import temporary_file
label_desc: Use image node_id 17 for calling the ForeignTests obj's underlying member method code with example usage: obj.testEdgeDataFrames() without return types