diff --git a/docs/source/transforms.rst b/docs/source/transforms.rst
index 673d4bae..b02db767 100644
--- a/docs/source/transforms.rst
+++ b/docs/source/transforms.rst
@@ -343,6 +343,12 @@ Vanilla Transforms
     :members:
     :special-members: __call__
 
+`Lambda`
+~~~~~~~~
+.. autoclass:: Lambda
+    :members:
+    :special-members: __call__
+
 `SplitChannel`
 ~~~~~~~~~~~~~~
 .. autoclass:: SplitChannel
@@ -695,6 +701,12 @@ Dictionary-based Transforms
     :members:
     :special-members: __call__
 
+`Lambdad`
+~~~~~~~~~
+.. autoclass:: Lambdad
+    :members:
+    :special-members: __call__
+
 
 Transform Adaptors
 ------------------
diff --git a/monai/transforms/utility/array.py b/monai/transforms/utility/array.py
index 5b2eb426..a82c8f8b 100644
--- a/monai/transforms/utility/array.py
+++ b/monai/transforms/utility/array.py
@@ -291,3 +291,29 @@ class SimulateDelay(Transform):
     def __call__(self, img, delay_time=None):
         time.sleep(self.delay_time if delay_time is None else delay_time)
         return img
+
+
+class Lambda(Transform):
+    """
+    Apply a user-defined lambda as a transform.
+
+    For example:
+
+    .. code-block:: python
+        :emphasize-lines: 2
+
+        image = np.ones((10, 2, 2))
+        lambd = Lambda(func=lambda x: x[:4, :, :])
+        print(lambd(image).shape)
+        (4, 2, 2)
+
+    Args:
+        func: Lambda/function to be applied.
+    """
+
+    def __init__(self, func: Callable) -> None:
+        assert callable(func), "func must be callable"
+        self.func = func
+
+    def __call__(self, img):
+        return self.func(img)
diff --git a/monai/transforms/utility/dictionary.py b/monai/transforms/utility/dictionary.py
index 8ad2d211..7b8d9f84 100644
--- a/monai/transforms/utility/dictionary.py
+++ b/monai/transforms/utility/dictionary.py
@@ -16,7 +16,7 @@ Class names are ended with 'd' to denote dictionary-based transforms.
 """
 
 from logging import Handler
-from typing import Optional
+from typing import Optional, Callable
 import copy
 import torch
 import numpy as np
@@ -36,6 +36,7 @@ from monai.transforms.utility.array import (
     DataStats,
     SimulateDelay,
     Identity,
+    Lambda,
 )
 
 
@@ -413,6 +414,37 @@ class ConcatItemsd(MapTransform):
         return d
 
 
+class Lambdad(MapTransform):
+    """
+    Dictionary-based wrapper of :py:class:`monai.transforms.Lambda`.
+
+    For example:
+
+    .. code-block:: python
+        :emphasize-lines: 2
+
+        input_data={'image': np.zeros((10, 2, 2)), 'label': np.ones((10, 2, 2))}
+        lambd = Lambdad(keys='label', func=lambda x: x[:4, :, :])
+        print(lambd(input_data)['label'].shape)
+        (4, 2, 2)
+
+    Args:
+        keys: keys of the corresponding items to be transformed.
+            See also: :py:class:`monai.transforms.compose.MapTransform`
+        func: Lambda/function to be applied.
+    """
+
+    def __init__(self, keys: KeysCollection, func: Callable) -> None:
+        super().__init__(keys)
+        self.lambd = Lambda(func)
+
+    def __call__(self, data):
+        d = dict(data)
+        for key in self.keys:
+            d[key] = self.lambd(d[key])
+        return d
+
+
 IdentityD = IdentityDict = Identityd
 AsChannelFirstD = AsChannelFirstDict = AsChannelFirstd
 AsChannelLastD = AsChannelLastDict = AsChannelLastd
@@ -426,3 +458,4 @@ DataStatsD = DataStatsDict = DataStatsd
 SimulateDelayD = SimulateDelayDict = SimulateDelayd
 CopyItemsD = CopyItemsDict = CopyItemsd
 ConcatItemsD = ConcatItemsDict = ConcatItemsd
+LambdaD = LambdaDict = Lambdad

lambda transform
**Is your feature request related to a problem? Please describe.**
this feature request is about providing a transform that supports use-defined simple lambda functions.

a use case came from the experiments is, for example,
only retaining the first four classes from a segmentation ground truth:

assuming the input
`input_data={'image': array, 'label': np.ones((10, 2, 2))}`
a lambda transform could generate:
`data={'image': array, 'label': input_data['label'][:4, :, :]}`

**Describe the solution you'd like**
for that example, the proposed transform would be (writing in-place):
```python
monai.transforms.Lambda(keys='label', func=lambda x: x[:4, :, :])
```

**Describe alternatives you've considered**
Since transform is just a callable, it could be done with the build-in lambda:
```python
lambda data_dict: data_dict.update({'label': data_dict['label'][:4,:,:]}) or data_dict
```
but the code is difficult to follow

**Additional context**
see also torchvision Lambda https://pytorch.org/docs/stable/torchvision/transforms.html#torchvision.transforms.Lambda

diff --git a/tests/test_lambda.py b/tests/test_lambda.py
new file mode 100644
index 00000000..96ebd887
--- /dev/null
+++ b/tests/test_lambda.py
@@ -0,0 +1,41 @@
+# Copyright 2020 MONAI Consortium
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#     http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import unittest
+
+import numpy as np
+
+from monai.transforms.utility.array import Lambda
+from tests.utils import NumpyImageTestCase2D
+
+
+class TestLambda(NumpyImageTestCase2D):
+    def test_lambda_identity(self):
+        img = self.imt
+
+        def identity_func(x):
+            return x
+
+        lambd = Lambda(func=identity_func)
+        self.assertTrue(np.allclose(identity_func(img), lambd(img)))
+
+    def test_lambda_slicing(self):
+        img = self.imt
+
+        def slice_func(x):
+            return x[:, :, :6, ::-2]
+
+        lambd = Lambda(func=slice_func)
+        self.assertTrue(np.allclose(slice_func(img), lambd(img)))
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/tests/test_lambdad.py b/tests/test_lambdad.py
new file mode 100644
index 00000000..fbebe081
--- /dev/null
+++ b/tests/test_lambdad.py
@@ -0,0 +1,49 @@
+# Copyright 2020 MONAI Consortium
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#     http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import unittest
+
+import numpy as np
+
+from monai.transforms.utility.dictionary import Lambdad
+from tests.utils import NumpyImageTestCase2D
+
+
+class TestLambdad(NumpyImageTestCase2D):
+    def test_lambdad_identity(self):
+        img = self.imt
+        data = dict()
+        data["img"] = img
+
+        def identity_func(x):
+            return x
+
+        lambd = Lambdad(keys=data.keys(), func=identity_func)
+        expected = data
+        expected["img"] = identity_func(data["img"])
+        self.assertTrue(np.allclose(expected["img"], lambd(data)["img"]))
+
+    def test_lambdad_slicing(self):
+        img = self.imt
+        data = dict()
+        data["img"] = img
+
+        def slice_func(x):
+            return x[:, :, :6, ::-2]
+
+        lambd = Lambdad(keys=data.keys(), func=slice_func)
+        expected = dict()
+        expected["img"] = slice_func(data["img"])
+        self.assertTrue(np.allclose(expected["img"], lambd(data)["img"]))
+
+
+if __name__ == "__main__":
+    unittest.main()

pip install -e .[all]
parse_log_pytest
requirements.txt
pytest black flake8 mypy pytype
apt-get update apt-get install -y gcc
3.6
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
absl-py==1.4.0
attrs==22.2.0
black==22.8.0
cachetools==4.2.4
certifi==2021.5.30
charset-normalizer==2.0.12
click==8.0.4
cycler==0.11.0
dataclasses==0.8
decorator==4.4.2
flake8==5.0.4
google-auth==2.22.0
google-auth-oauthlib==0.4.6
grpcio==1.48.2
idna==3.10
imageio==2.15.0
importlab==0.8.1
importlib-metadata==4.8.3
iniconfig==1.1.1
kiwisolver==1.3.1
libcst==0.4.1
Markdown==3.3.7
matplotlib==3.3.4
mccabe==0.7.0
-e git+https://github.com/Project-MONAI/MONAI.git@e8c26a2baa539624c36aa1262e6de9009c74cfda#egg=monai
mypy==0.971
mypy-extensions==1.0.0
networkx==2.5.1
nibabel==3.2.2
ninja==1.11.1.1
numpy==1.19.5
oauthlib==3.2.2
packaging==21.3
pathspec==0.9.0
Pillow==8.4.0
platformdirs==2.4.0
pluggy==1.0.0
protobuf==3.19.6
py==1.11.0
pyasn1==0.5.1
pyasn1-modules==0.3.0
pycodestyle==2.9.1
pyflakes==2.5.0
pyparsing==3.1.4
pytest==7.0.1
python-dateutil==2.9.0.post0
pytorch-ignite==0.3.0
pytype==2022.1.5
PyWavelets==1.1.1
PyYAML==6.0.1
requests==2.27.1
requests-oauthlib==2.0.0
rsa==4.9
scikit-image==0.17.2
scipy==1.5.4
six==1.17.0
tabulate==0.8.10
tensorboard==2.10.1
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.1
tifffile==2020.9.3
toml==0.10.2
tomli==1.2.3
torch==1.10.2
typed-ast==1.5.5
typing-inspect==0.9.0
typing_extensions==4.1.1
urllib3==1.26.20
Werkzeug==2.0.3
zipp==3.6.0

name: MONAI
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
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - 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=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - absl-py==1.4.0
      - attrs==22.2.0
      - black==22.8.0
      - cachetools==4.2.4
      - charset-normalizer==2.0.12
      - click==8.0.4
      - cycler==0.11.0
      - dataclasses==0.8
      - decorator==4.4.2
      - flake8==5.0.4
      - google-auth==2.22.0
      - google-auth-oauthlib==0.4.6
      - grpcio==1.48.2
      - idna==3.10
      - imageio==2.15.0
      - importlab==0.8.1
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - kiwisolver==1.3.1
      - libcst==0.4.1
      - markdown==3.3.7
      - matplotlib==3.3.4
      - mccabe==0.7.0
      - mypy==0.971
      - mypy-extensions==1.0.0
      - networkx==2.5.1
      - nibabel==3.2.2
      - ninja==1.11.1.1
      - numpy==1.19.5
      - oauthlib==3.2.2
      - packaging==21.3
      - pathspec==0.9.0
      - pillow==8.4.0
      - platformdirs==2.4.0
      - pluggy==1.0.0
      - protobuf==3.19.6
      - py==1.11.0
      - pyasn1==0.5.1
      - pyasn1-modules==0.3.0
      - pycodestyle==2.9.1
      - pyflakes==2.5.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - python-dateutil==2.9.0.post0
      - pytorch-ignite==0.3.0
      - pytype==2022.1.5
      - pywavelets==1.1.1
      - pyyaml==6.0.1
      - requests==2.27.1
      - requests-oauthlib==2.0.0
      - rsa==4.9
      - scikit-image==0.17.2
      - scipy==1.5.4
      - six==1.17.0
      - tabulate==0.8.10
      - tensorboard==2.10.1
      - tensorboard-data-server==0.6.1
      - tensorboard-plugin-wit==1.8.1
      - tifffile==2020.9.3
      - toml==0.10.2
      - tomli==1.2.3
      - torch==1.10.2
      - typed-ast==1.5.5
      - typing-extensions==4.1.1
      - typing-inspect==0.9.0
      - urllib3==1.26.20
      - werkzeug==2.0.3
      - zipp==3.6.0
prefix: /opt/conda/envs/MONAI

tests/test_lambda.py::TestLambda::test_lambda_identity tests/test_lambda.py::TestLambda::test_lambda_slicing tests/test_lambdad.py::TestLambdad::test_lambdad_identity tests/test_lambdad.py::TestLambdad::test_lambdad_slicing
monai/transforms/utility/dictionary.py monai/transforms/utility/array.py docs/source/transforms.rst
monai/transforms/utility/dictionary.py monai/transforms/utility/array.py docs/source/transforms.rst