diff --git a/nitdms/waveformdatatype.py b/nitdms/waveformdatatype.py
index 75f246e..7dbc4c1 100644
--- a/nitdms/waveformdatatype.py
+++ b/nitdms/waveformdatatype.py
@@ -46,9 +46,24 @@ class WaveformDT(np.ndarray):
         self.dt = getattr(obj, "dt", 1.0)
 
     def __repr__(self):
-        repr_str = super(WaveformDT, self).__repr__()
-        wf_details = f", {self.dt}, {self.t0})"
-        return repr_str.replace(")", wf_details)
+        t0 = self.t0 if isinstance(self.t0, Number) else 0.0
+        t0 += getattr(self, "wf_start_offset", 0.0)
+        dt = self.dt
+        rows = []
+        if self.size < 50:
+            for i, sample in enumerate(self):
+                rows.append(f"{t0 + i*dt:11.4e}\t{sample:11.4e}")
+        else:
+            for i, sample in enumerate(self[:5]):
+                rows.append(f"{t0 + i*dt:11.4e}\t{sample:11.4e}")
+            rows.append(" ...")
+            t0 = t0 + (self.size - 5) * dt
+            for i, sample in enumerate(self[-5:]):
+                rows.append(f"{t0 + i*dt:11.4e}\t{sample:11.4e}")
+        rows.append(f"Length: {self.size}")
+        rows.append(f"t0: {self.t0}")
+        rows.append(f"dt: {self.dt:11.4e}")
+        return "\n".join(rows)
 
     @property
     def Y(self):
@@ -122,3 +137,30 @@ class WaveformDT(np.ndarray):
         if method == "at":
             return None
         return results[0] if len(results) == 1 else results
+
+    def head(self, n=5):
+        """Return first n samples of the waveform
+
+        Args:
+            n (int): number of samples to return
+
+        Returns:
+            (WaveformDT): first n samples
+        """
+        return self[:n]
+
+    def tail(self, n=5):
+        """Return the last n samples of the waveform
+
+        Args:
+            n (int): number of samples to return
+
+        Returns:
+            (WaveformDT): last n samples
+        """
+        start_offset = self.t0 if isinstance(self.t0, Number) else 0.0
+        start_offset += getattr(self, "wf_start_offset", 0.0)
+        start_offset += (self.size - n) * self.dt
+        wf = self[-n:]
+        setattr(wf, "wf_start_offset", start_offset)
+        return wf

Add head() and tail() functions to WaveformDT. AB#5
diff --git a/tests/test_wdt.py b/tests/test_wdt.py
index 030f451..3de2f01 100644
--- a/tests/test_wdt.py
+++ b/tests/test_wdt.py
@@ -65,8 +65,28 @@ def test_extraattributes():
 
 
 def test_repr():
-    wf = WaveformDT([1, 2, 3], 1, 0)
-    assert wf.__repr__() == "WaveformDT([1, 2, 3], 1, 0)"
+    wf = WaveformDT([1, 2], 1, 0)
+    expected = (
+        " 0.0000e+00\t 1.0000e+00\n 1.0000e+00\t 2.0000e+00\n"
+        + "Length: 2\nt0: 0\ndt:  1.0000e+00"
+    )
+    assert wf.__repr__() == expected
+    wf = WaveformDT(range(60), 1, 0)
+    expected = (
+        " 0.0000e+00\t 0.0000e+00\n"
+        " 1.0000e+00\t 1.0000e+00\n"
+        " 2.0000e+00\t 2.0000e+00\n"
+        " 3.0000e+00\t 3.0000e+00\n"
+        " 4.0000e+00\t 4.0000e+00\n"
+        " ...\n"
+        " 5.5000e+01\t 5.5000e+01\n"
+        " 5.6000e+01\t 5.6000e+01\n"
+        " 5.7000e+01\t 5.7000e+01\n"
+        " 5.8000e+01\t 5.8000e+01\n"
+        " 5.9000e+01\t 5.9000e+01\n"
+        "Length: 60\nt0: 0\ndt:  1.0000e+00"
+    )
+    assert wf.__repr__() == expected
 
 
 def test_Y():
@@ -103,3 +123,31 @@ def test_ufunc_out():
     np.multiply(a, 2.0, out=c)
     results = c == WaveformDT([2.0, 4.0, 6.0], 2, 1)
     assert results.all()
+
+
+def test_head():
+    wf = WaveformDT(range(60), 1, 0)
+    wf_head = wf.head()
+    expected = (
+        " 0.0000e+00\t 0.0000e+00\n"
+        " 1.0000e+00\t 1.0000e+00\n"
+        " 2.0000e+00\t 2.0000e+00\n"
+        " 3.0000e+00\t 3.0000e+00\n"
+        " 4.0000e+00\t 4.0000e+00\n"
+        "Length: 5\nt0: 0\ndt:  1.0000e+00"
+    )
+    assert wf_head.__repr__() == expected
+
+
+def test_tail():
+    wf = WaveformDT(range(60), 1, 0)
+    wf_tail = wf.tail()
+    expected = (
+        " 5.5000e+01\t 5.5000e+01\n"
+        " 5.6000e+01\t 5.6000e+01\n"
+        " 5.7000e+01\t 5.7000e+01\n"
+        " 5.8000e+01\t 5.8000e+01\n"
+        " 5.9000e+01\t 5.9000e+01\n"
+        "Length: 5\nt0: 0\ndt:  1.0000e+00"
+    )
+    assert wf_tail.__repr__() == expected

pip install -e .
parse_log_pytest
pytest
numpy>=1.16.0 pytest pytest-cov
3.9
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
coverage==7.8.0
exceptiongroup @ file:///croot/exceptiongroup_1706031385326/work
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
-e git+https://github.com/l-johnston/nitdms.git@a98c8c325af85c66272a1357cc75c9facf964913#egg=nitdms
numpy==2.0.2
packaging @ file:///croot/packaging_1734472117206/work
pluggy @ file:///croot/pluggy_1733169602837/work
pytest @ file:///croot/pytest_1738938843180/work
pytest-cov==6.0.0
tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work

name: nitdms
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - exceptiongroup=1.2.0=py39h06a4308_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - packaging=24.2=py39h06a4308_0
  - pip=25.0=py39h06a4308_0
  - pluggy=1.5.0=py39h06a4308_0
  - pytest=8.3.4=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tomli=2.0.1=py39h06a4308_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - coverage==7.8.0
      - numpy==2.0.2
      - pytest-cov==6.0.0
prefix: /opt/conda/envs/nitdms

tests/test_wdt.py::test_repr tests/test_wdt.py::test_head tests/test_wdt.py::test_tail
tests/test_wdt.py::test_analog tests/test_wdt.py::test_analog_multiplewrites tests/test_wdt.py::test_daqmx_linear_voltage tests/test_wdt.py::test_toxy_relative tests/test_wdt.py::test_toxy_absolute tests/test_wdt.py::test_extraattributes tests/test_wdt.py::test_Y tests/test_wdt.py::test_ufunc tests/test_wdt.py::test_ufunc_multiply tests/test_wdt.py::test_ufunc_multiplyat tests/test_wdt.py::test_ufunc_out
nitdms/waveformdatatype.py
nitdms/waveformdatatype.py