Skip to content

Commit d55d912

Browse files
authored
1 parent 224bf18 commit d55d912

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pygmt/_show_versions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818

1919
# Get semantic version through setuptools-scm
2020
__version__ = f"v{version('pygmt')}" # e.g. v0.1.2.dev3+g0ab3cd78
21-
__commit__ = __version__.split("+g")[-1] if "+g" in __version__ else "" # 0ab3cd78
21+
__commit__ = ( # 0ab3cd78
22+
__version__.rsplit(sep="+g", maxsplit=1)[-1] if "+g" in __version__ else ""
23+
)
2224

2325

2426
def _get_clib_info() -> dict[str, str]:

pygmt/tests/test_datatypes_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def dataframe_from_pandas(filepath_or_buffer, sep=r"\s+", comment="#", header=No
3333
dtype = "object" if Version(pd.__version__) < Version("3.0.0.dev0") else "str"
3434
string_columns = df.select_dtypes(include=[dtype]).columns
3535
if len(string_columns) > 1:
36-
df[string_columns[0]] = df[string_columns].apply(lambda x: " ".join(x), axis=1)
36+
df[string_columns[0]] = df[string_columns].agg(func=" ".join, axis=1)
3737
df = df.drop(string_columns[1:], axis=1)
3838
# Convert 'object' to 'string' type
3939
df = df.convert_dtypes(

0 commit comments

Comments
 (0)