If no mutations have been created in the row, no request is made.
Mutations are applied atomically and in order, meaning that earlier
mutations can be masked / negated by later ones. Cells already present
in the row are left unchanged unless explicitly changed by a mutation.
After committing the accumulated mutations, resets the local
mutations to an empty list.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Class DirectRow (2.32.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.32.0 (latest)](/python/docs/reference/bigtable/latest/google.cloud.bigtable.row.DirectRow)\n- [2.31.0](/python/docs/reference/bigtable/2.31.0/google.cloud.bigtable.row.DirectRow)\n- [2.30.1](/python/docs/reference/bigtable/2.30.1/google.cloud.bigtable.row.DirectRow)\n- [2.29.0](/python/docs/reference/bigtable/2.29.0/google.cloud.bigtable.row.DirectRow)\n- [2.28.1](/python/docs/reference/bigtable/2.28.1/google.cloud.bigtable.row.DirectRow)\n- [2.26.0](/python/docs/reference/bigtable/2.26.0/google.cloud.bigtable.row.DirectRow)\n- [2.25.0](/python/docs/reference/bigtable/2.25.0/google.cloud.bigtable.row.DirectRow)\n- [2.24.0](/python/docs/reference/bigtable/2.24.0/google.cloud.bigtable.row.DirectRow)\n- [2.23.1](/python/docs/reference/bigtable/2.23.1/google.cloud.bigtable.row.DirectRow)\n- [2.22.0](/python/docs/reference/bigtable/2.22.0/google.cloud.bigtable.row.DirectRow)\n- [2.21.0](/python/docs/reference/bigtable/2.21.0/google.cloud.bigtable.row.DirectRow)\n- [2.20.0](/python/docs/reference/bigtable/2.20.0/google.cloud.bigtable.row.DirectRow)\n- [2.19.0](/python/docs/reference/bigtable/2.19.0/google.cloud.bigtable.row.DirectRow)\n- [2.18.1](/python/docs/reference/bigtable/2.18.1/google.cloud.bigtable.row.DirectRow)\n- [2.17.0](/python/docs/reference/bigtable/2.17.0/google.cloud.bigtable.row.DirectRow)\n- [2.16.0](/python/docs/reference/bigtable/2.16.0/google.cloud.bigtable.row.DirectRow)\n- [2.15.0](/python/docs/reference/bigtable/2.15.0/google.cloud.bigtable.row.DirectRow)\n- [2.14.1](/python/docs/reference/bigtable/2.14.1/google.cloud.bigtable.row.DirectRow)\n- [2.13.2](/python/docs/reference/bigtable/2.13.2/google.cloud.bigtable.row.DirectRow)\n- [2.12.0](/python/docs/reference/bigtable/2.12.0/google.cloud.bigtable.row.DirectRow)\n- [2.11.3](/python/docs/reference/bigtable/2.11.3/google.cloud.bigtable.row.DirectRow)\n- [2.10.1](/python/docs/reference/bigtable/2.10.1/google.cloud.bigtable.row.DirectRow)\n- [2.9.0](/python/docs/reference/bigtable/2.9.0/google.cloud.bigtable.row.DirectRow)\n- [2.8.1](/python/docs/reference/bigtable/2.8.1/google.cloud.bigtable.row.DirectRow)\n- [2.7.1](/python/docs/reference/bigtable/2.7.1/google.cloud.bigtable.row.DirectRow)\n- [2.6.0](/python/docs/reference/bigtable/2.6.0/google.cloud.bigtable.row.DirectRow)\n- [2.5.2](/python/docs/reference/bigtable/2.5.2/google.cloud.bigtable.row.DirectRow)\n- [2.4.0](/python/docs/reference/bigtable/2.4.0/google.cloud.bigtable.row.DirectRow)\n- [2.3.3](/python/docs/reference/bigtable/2.3.3/google.cloud.bigtable.row.DirectRow)\n- [2.2.0](/python/docs/reference/bigtable/2.2.0/google.cloud.bigtable.row.DirectRow)\n- [2.1.0](/python/docs/reference/bigtable/2.1.0/google.cloud.bigtable.row.DirectRow)\n- [2.0.0](/python/docs/reference/bigtable/2.0.0/google.cloud.bigtable.row.DirectRow)\n- [1.7.3](/python/docs/reference/bigtable/1.7.3/google.cloud.bigtable.row.DirectRow)\n- [1.6.1](/python/docs/reference/bigtable/1.6.1/google.cloud.bigtable.row.DirectRow)\n- [1.5.1](/python/docs/reference/bigtable/1.5.1/google.cloud.bigtable.row.DirectRow)\n- [1.4.0](/python/docs/reference/bigtable/1.4.0/google.cloud.bigtable.row.DirectRow)\n- [1.3.0](/python/docs/reference/bigtable/1.3.0/google.cloud.bigtable.row.DirectRow)\n- [1.2.1](/python/docs/reference/bigtable/1.2.1/google.cloud.bigtable.row.DirectRow)\n- [1.1.0](/python/docs/reference/bigtable/1.1.0/google.cloud.bigtable.row.DirectRow)\n- [1.0.0](/python/docs/reference/bigtable/1.0.0/google.cloud.bigtable.row.DirectRow)\n- [0.34.0](/python/docs/reference/bigtable/0.34.0/google.cloud.bigtable.row.DirectRow) \n\n DirectRow(row_key, table=None)\n\nGoogle Cloud Bigtable Row for sending \"direct\" mutations.\n\nThese mutations directly set or delete cell contents:\n\n- `set_cell`\n- `delete`\n- `delete_cell`\n- `delete_cells`\n\nThese methods can be used directly::\n\u003e \u003e \u003e row = table.row(b'row-key1')\n\u003e \u003e \u003e row.set_cell(u'fam', b'col1', b'cell-val')\n\u003e \u003e \u003e row.delete_cell(u'fam', b'col2')\n| **Note:** A `DirectRow` accumulates mutations locally via the `set_cell`, `delete`, `delete_cell` and `delete_cells` methods. To actually send these mutations to the Google Cloud Bigtable API, you must call `commit`.\n\nProperties\n----------\n\n### row_key\n\nRow key.\n\nFor example:\n\n.. literalinclude:: snippets_table.py\n:start-after: \\[START bigtable_api_row_row_key\\]\n:end-before: \\[END bigtable_api_row_row_key\\]\n:dedent: 4\n\n### table\n\nRow table.\n\nFor example:\n\n.. literalinclude:: snippets_table.py\n:start-after: \\[START bigtable_api_row_table\\]\n:end-before: \\[END bigtable_api_row_table\\]\n:dedent: 4\n\nMethods\n-------\n\n### clear\n\n clear()\n\nRemoves all currently accumulated mutations on the current row.\n\nFor example:\n\n.. literalinclude:: snippets_table.py\n:start-after: \\[START bigtable_api_row_clear\\]\n:end-before: \\[END bigtable_api_row_clear\\]\n:dedent: 4\n\n### commit\n\n commit()\n\nMakes a `MutateRow` API request.\n\nIf no mutations have been created in the row, no request is made.\n\nMutations are applied atomically and in order, meaning that earlier\nmutations can be masked / negated by later ones. Cells already present\nin the row are left unchanged unless explicitly changed by a mutation.\n\nAfter committing the accumulated mutations, resets the local\nmutations to an empty list.\n\nFor example:\n\n.. literalinclude:: snippets_table.py\n:start-after: \\[START bigtable_api_row_commit\\]\n:end-before: \\[END bigtable_api_row_commit\\]\n:dedent: 4\n\n### delete\n\n delete()\n\nDeletes this row from the table.\n\n\u003cbr /\u003e\n\n| **Note:** This method adds a mutation to the accumulated mutations on this row, but does not make an API request. To actually send an API request (with the mutations) to the Google Cloud Bigtable API, call `commit`.\n.. literalinclude:: snippets_table.py :start-after: \\[START bigtable_api_row_delete\\] :end-before: \\[END bigtable_api_row_delete\\] :dedent: 4\n\n\u003cbr /\u003e\n\n### delete_cell\n\n delete_cell(column_family_id, column, time_range=None)\n\nDeletes cell in this row.\n\n\u003cbr /\u003e\n\n| **Note:** This method adds a mutation to the accumulated mutations on this row, but does not make an API request. To actually send an API request (with the mutations) to the Google Cloud Bigtable API, call `commit`.\n.. literalinclude:: snippets_table.py :start-after: \\[START bigtable_api_row_delete_cell\\] :end-before: \\[END bigtable_api_row_delete_cell\\] :dedent: 4\n\n\u003cbr /\u003e\n\n### delete_cells\n\n delete_cells(column_family_id, columns, time_range=None)\n\nDeletes cells in this row.\n\n\u003cbr /\u003e\n\n| **Note:** This method adds a mutation to the accumulated mutations on this row, but does not make an API request. To actually send an API request (with the mutations) to the Google Cloud Bigtable API, call `commit`.\n.. literalinclude:: snippets_table.py :start-after: \\[START bigtable_api_row_delete_cells\\] :end-before: \\[END bigtable_api_row_delete_cells\\] :dedent: 4\n\n\u003cbr /\u003e\n\n### get_mutations_size\n\n get_mutations_size()\n\nGets the total mutations size for current row\n\nFor example:\n\n.. literalinclude:: snippets_table.py\n:start-after: \\[START bigtable_api_row_get_mutations_size\\]\n:end-before: \\[END bigtable_api_row_get_mutations_size\\]\n:dedent: 4\n\n### set_cell\n\n set_cell(column_family_id, column, value, timestamp=None)\n\nSets a value in this row.\n\nThe cell is determined by the `row_key` of this `DirectRow`\nand the `column`. The `column` must be in an existing\n`.ColumnFamily` (as determined by `column_family_id`).\n\n\u003cbr /\u003e\n\n| **Note:** This method adds a mutation to the accumulated mutations on this row, but does not make an API request. To actually send an API request (with the mutations) to the Google Cloud Bigtable API, call `commit`.\n.. literalinclude:: snippets_table.py :start-after: \\[START bigtable_api_row_set_cell\\] :end-before: \\[END bigtable_api_row_set_cell\\] :dedent: 4\n\n\u003cbr /\u003e"]]