INNER CODE UNIT · Python

head

guma44/GEOparse · src/GEOparse/GEOTypes.py:283

    def head(self):
        """Print short description of the object."""
        summary = list()
        summary.append("%s %s" % (self.geotype, self.name) + "\n")
        summary.append(" - Metadata:" + "\n")
        summary.append("\n".join(self._get_metadata_as_string().split("\n")[:5]) + "\n")
        summary.append("\n")
        summary.append(" - Columns:" + "\n")
        summary.append(self.columns.to_string() + "\n")
        summary.append("\n")
        summary.append(" - Table:" + "\n")
        summary.append("\t".join(["Index"] + self.table.columns.tolist()) + "\n")
        summary.append(self.table.head().to_string(header=None) + "\n")
        summary.append(" " * 40 + "..." + " " * 40 + "\n")
        summary.append(" " * 40 + "..." + " " * 40 + "\n")
        summary.append(" " * 40 + "..." + " " * 40 + "\n")
        summary.append(self.table.tail().to_string(header=None) + "\n")
        return "\n".join([str(s) for s in summary])

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…