MCPcopy
hub / github.com/burnash/gspread / row_values

Method row_values

gspread/worksheet.py:620–694  ·  view source on GitHub ↗

Returns a list of all values in a `row`. Empty cells in this list will be rendered as :const:`None`. :param int row: Row number (one-based). :param str major_dimension: (optional) The major dimension of the values. `Dimension.rows` ("ROWS") or `Dimension.cols`

(
        self,
        row: int,
        major_dimension: Optional[Dimension] = None,
        value_render_option: Optional[ValueRenderOption] = None,
        date_time_render_option: Optional[DateTimeOption] = None,
    )

Source from the content-addressed store, hash-verified

618 return self.range()
619
620 def row_values(
621 self,
622 row: int,
623 major_dimension: Optional[Dimension] = None,
624 value_render_option: Optional[ValueRenderOption] = None,
625 date_time_render_option: Optional[DateTimeOption] = None,
626 ) -> List[str]:
627 """Returns a list of all values in a `row`.
628
629 Empty cells in this list will be rendered as :const:`None`.
630
631 :param int row: Row number (one-based).
632
633 :param str major_dimension: (optional) The major dimension of the
634 values. `Dimension.rows` ("ROWS") or `Dimension.cols` ("COLUMNS").
635 Defaults to Dimension.rows
636 :type major_dimension: :class:`~gspread.utils.Dimension`
637
638 :param value_render_option: (optional) Determines how values should
639 be rendered in the output. See `ValueRenderOption`_ in
640 the Sheets API.
641
642 Possible values are:
643
644 ``ValueRenderOption.formatted``
645 (default) Values will be calculated and formatted according
646 to the cell's formatting. Formatting is based on the
647 spreadsheet's locale, not the requesting user's locale.
648
649 ``ValueRenderOption.unformatted``
650 Values will be calculated, but not formatted in the reply.
651 For example, if A1 is 1.23 and A2 is =A1 and formatted as
652 currency, then A2 would return the number 1.23.
653
654 ``ValueRenderOption.formula``
655 Values will not be calculated. The reply will include
656 the formulas. For example, if A1 is 1.23 and A2 is =A1 and
657 formatted as currency, then A2 would return "=A1".
658
659 .. _ValueRenderOption: https://developers.google.com/sheets/api/reference/rest/v4/ValueRenderOption
660
661 :type value_render_option: :class:`~gspread.utils.ValueRenderOption`
662
663 :param date_time_render_option: (optional) How dates, times, and
664 durations should be represented in the output.
665
666 Possible values are:
667
668 ``DateTimeOption.serial_number``
669 (default) Instructs date, time, datetime, and duration fields
670 to be output as doubles in "serial number" format,
671 as popularized by Lotus 1-2-3.
672
673 ``DateTimeOption.formatted_string``
674 Instructs date, time, datetime, and duration fields to be output
675 as strings in their given number format
676 (which depends on the spreadsheet locale).
677

Calls 2

getMethod · 0.95
formatMethod · 0.80