GeezerVison is showing github.com — Session.virtualfile_to_dataset: Rename parameter 'column_names' to 'n… · GenericMappingTools/pygmt@f211b7d
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: pygmt/clib/session.py +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1746,7 +1746,7 @@ def virtualfile_to_dataset( | 1746 | 1746 | self, | 1747 | 1747 | vfname: str, | 1748 | 1748 | output_type: Literal["pandas", "numpy", "file"] = "pandas", | 1749 | | - column_names: list[str] | None = None, | | 1749 | + names: list[str] | None = None, | 1750 | 1750 | dtype: type | dict[str, type] | None = None, | 1751 | 1751 | index_col: str | int | None = None, | 1752 | 1752 | ) -> pd.DataFrame | np.ndarray | None: | @@ -1766,7 +1766,7 @@ def virtualfile_to_dataset( | 1766 | 1766 | - ``"pandas"`` will return a :class:`pandas.DataFrame` object. | 1767 | 1767 | - ``"numpy"`` will return a :class:`numpy.ndarray` object. | 1768 | 1768 | - ``"file"`` means the result was saved to a file and will return ``None``. | 1769 | | - column_names | | 1769 | + names | 1770 | 1770 | The column names for the :class:`pandas.DataFrame` output. | 1771 | 1771 | dtype | 1772 | 1772 | Data type for the columns of the :class:`pandas.DataFrame` output. Can be a | @@ -1862,7 +1862,7 @@ def virtualfile_to_dataset( | 1862 | 1862 |
| 1863 | 1863 | # Read the virtual file as a GMT dataset and convert to pandas.DataFrame | 1864 | 1864 | result = self.read_virtualfile(vfname, kind="dataset").contents.to_dataframe( | 1865 | | - names=column_names, | | 1865 | + names=names, | 1866 | 1866 | dtype=dtype, | 1867 | 1867 | index_col=index_col, | 1868 | 1868 | ) | |
Collapse file Copy file name to clipboardExpand all lines: pygmt/src/blockm.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -64,7 +64,7 @@ def _blockm( | 64 | 64 | args=build_arg_string(kwargs, infile=vintbl, outfile=vouttbl), | 65 | 65 | ) | 66 | 66 | return lib.virtualfile_to_dataset( | 67 | | - vfname=vouttbl, output_type=output_type, column_names=column_names | | 67 | + vfname=vouttbl, output_type=output_type, names=column_names | 68 | 68 | ) | 69 | 69 |
| 70 | 70 |
| |
Collapse file Copy file name to clipboardExpand all lines: pygmt/src/grd2xyz.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -168,5 +168,5 @@ def grd2xyz( | 168 | 168 | args=build_arg_string(kwargs, infile=vingrd, outfile=vouttbl), | 169 | 169 | ) | 170 | 170 | return lib.virtualfile_to_dataset( | 171 | | - vfname=vouttbl, output_type=output_type, column_names=column_names | | 171 | + vfname=vouttbl, output_type=output_type, names=column_names | 172 | 172 | ) |
Collapse file Copy file name to clipboardExpand all lines: pygmt/src/grdhisteq.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -241,7 +241,7 @@ def compute_bins( | 241 | 241 | return lib.virtualfile_to_dataset( | 242 | 242 | vfname=vouttbl, | 243 | 243 | output_type=output_type, | 244 | | - column_names=["start", "stop", "bin_id"], | | 244 | + names=["start", "stop", "bin_id"], | 245 | 245 | dtype={ | 246 | 246 | "start": np.float32, | 247 | 247 | "stop": np.float32, | |
Collapse file Copy file name to clipboardExpand all lines: pygmt/src/grdtrack.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -320,5 +320,5 @@ def grdtrack( | 320 | 320 | return lib.virtualfile_to_dataset( | 321 | 321 | vfname=vouttbl, | 322 | 322 | output_type=output_type, | 323 | | - column_names=column_names, | | 323 | + names=column_names, | 324 | 324 | ) |
Collapse file Copy file name to clipboardExpand all lines: pygmt/src/project.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -258,5 +258,5 @@ def project( | 258 | 258 | return lib.virtualfile_to_dataset( | 259 | 259 | vfname=vouttbl, | 260 | 260 | output_type=output_type, | 261 | | - column_names=column_names, | | 261 | + names=column_names, | 262 | 262 | ) |
Collapse file Copy file name to clipboardExpand all lines: pygmt/src/select.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -223,5 +223,5 @@ def select( | 223 | 223 | return lib.virtualfile_to_dataset( | 224 | 224 | vfname=vouttbl, | 225 | 225 | output_type=output_type, | 226 | | - column_names=column_names, | | 226 | + names=column_names, | 227 | 227 | ) |
|