Skip to content

Commit 43732a7

Browse files
committed
Remove the conversion because it's already done in to_dataframe
1 parent 2476744 commit 43732a7

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

pygmt/clib/session.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1765,16 +1765,10 @@ def return_table(
17651765
return None
17661766
# Read the virtual file as a GMT dataset and convert to pandas.DataFrame
17671767
result = self.read_virtualfile(vfile, kind="dataset").contents.to_dataframe()
1768-
# assign column names
1768+
# Assign column names
17691769
if column_names is not None:
17701770
result.columns = column_names
1771-
# convert text data from object dtype to string dtype
1772-
result = result.convert_dtypes(
1773-
convert_string=True,
1774-
convert_integer=False,
1775-
convert_floating=False,
1776-
convert_boolean=False,
1777-
)
1771+
# Pandas.DataFrame output
17781772
if output_type == "pandas":
17791773
return result
17801774
# NumPy.ndarray output

0 commit comments

Comments
 (0)