@@ -36,7 +36,8 @@ class CovidcastRow:
3636 - converting from and to formats (dict, csv, df, kwargs)
3737 - creating consistent views, with consistent data types (dict, csv, df)
3838
39- The rows are specified in 'v4_schema.sql'. The datatypes are made to match database. When writing to Pandas, the dtypes match the JIT model.py schema.
39+ The rows are specified in 'v4_schema.sql'. The datatypes are made to match
40+ database. When writing to Pandas, the dtypes match the JIT model.py schema.
4041 """
4142
4243 # Arguments.
@@ -55,7 +56,8 @@ class CovidcastRow:
5556 missing_sample_size : int
5657 issue : int
5758 lag : int
58- # The following three fields are only the database, but are not ingested at acquisition and not returned by the API.
59+ # The following three fields are only in the database, but are not ingested at
60+ # acquisition and not returned by the API.
5961 epimetric_id : Optional [int ] = None
6062 direction : Optional [int ] = None
6163 value_updated_timestamp : Optional [int ] = 0
@@ -79,17 +81,20 @@ def as_dict(self, ignore_fields: Optional[List[str]] = None) -> dict:
7981 return d
8082
8183 def as_api_row_dict (self , ignore_fields : Optional [List [str ]] = None ) -> dict :
82- """Returns a dict view into the row with the fields returned by the API server."""
84+ """Returns a dict view into the row with the fields returned by the API
85+ server."""
8386 return self .as_dict (ignore_fields = self ._api_row_ignore_fields + (ignore_fields or []))
8487
8588 def as_api_compatibility_row_dict (self , ignore_fields : Optional [List [str ]] = None ) -> dict :
86- """Returns a dict view into the row with the fields returned by the old API server (the PHP server)."""
89+ """Returns a dict view into the row with the fields returned by the old
90+ API server (the PHP server)."""
8791 return self .as_dict (
8892 ignore_fields = self ._api_row_compatibility_ignore_fields + (ignore_fields or [])
8993 )
9094
9195 def as_db_row_dict (self , ignore_fields : Optional [List [str ]] = None ) -> dict :
92- """Returns a dict view into the row with the fields returned by the database."""
96+ """Returns a dict view into the row with the fields returned by the
97+ database."""
9398 return self .as_dict (ignore_fields = self ._db_row_ignore_fields + (ignore_fields or []))
9499
95100 def as_dataframe (self , ignore_fields : Optional [List [str ]] = None ) -> pd .DataFrame :
@@ -99,19 +104,22 @@ def as_dataframe(self, ignore_fields: Optional[List[str]] = None) -> pd.DataFram
99104 return df
100105
101106 def as_api_row_df (self , ignore_fields : Optional [List [str ]] = None ) -> pd .DataFrame :
102- """Returns a dataframe view into the row with the fields returned by the API server."""
107+ """Returns a dataframe view into the row with the fields returned by the
108+ API server."""
103109 return self .as_dataframe (ignore_fields = self ._api_row_ignore_fields + (ignore_fields or []))
104110
105- def as_api_compatibility_row_df (
106- self , ignore_fields : Optional [List [str ]] = None
107- ) -> pd .DataFrame :
108- """Returns a dataframe view into the row with the fields returned by the old API server (the PHP server)."""
111+ # fmt: off
112+ def as_api_compatibility_row_df (self , ignore_fields : Optional [List [str ]] = None ) -> pd .DataFrame :
113+ """Returns a dataframe view into the row with the fields returned by the
114+ old API server (the PHP server)."""
115+ # fmt: on
109116 return self .as_dataframe (
110117 ignore_fields = self ._api_row_compatibility_ignore_fields + (ignore_fields or [])
111118 )
112119
113120 def as_db_row_df (self , ignore_fields : Optional [List [str ]] = None ) -> pd .DataFrame :
114- """Returns a dataframe view into the row with the fields returned by an all-field database query."""
121+ """Returns a dataframe view into the row with the fields returned by an
122+ all-field database query."""
115123 return self .as_dataframe (ignore_fields = self ._db_row_ignore_fields + (ignore_fields or []))
116124
117125 def signal_pair (self ):
0 commit comments