mirror of
https://github.com/clearml/clearml
synced 2025-02-12 07:35:08 +00:00
Don't add pandas artifact unnamed:0 column, return original pandas object.
This commit is contained in:
parent
30a08ee937
commit
5094ede309
@ -154,8 +154,10 @@ class Artifact(object):
|
|||||||
# noinspection PyProtectedMember
|
# noinspection PyProtectedMember
|
||||||
if self.type == 'numpy' and np:
|
if self.type == 'numpy' and np:
|
||||||
self._object = np.load(local_file)[self.name]
|
self._object = np.load(local_file)[self.name]
|
||||||
elif self.type in ('pandas', Artifacts._pd_artifact_type) and pd:
|
elif self.type == Artifacts._pd_artifact_type and pd:
|
||||||
self._object = pd.read_csv(local_file)
|
self._object = pd.read_csv(local_file)
|
||||||
|
elif self.type == 'pandas' and pd:
|
||||||
|
self._object = pd.read_csv(local_file, index_col=[0])
|
||||||
elif self.type == 'image':
|
elif self.type == 'image':
|
||||||
self._object = Image.open(local_file)
|
self._object = Image.open(local_file)
|
||||||
elif self.type == 'JSON':
|
elif self.type == 'JSON':
|
||||||
|
@ -309,9 +309,9 @@ class Logger(object):
|
|||||||
"please install the pandas python package"
|
"please install the pandas python package"
|
||||||
)
|
)
|
||||||
if url:
|
if url:
|
||||||
table = pd.read_csv(url)
|
table = pd.read_csv(url, index_col=[0])
|
||||||
elif csv:
|
elif csv:
|
||||||
table = pd.read_csv(csv)
|
table = pd.read_csv(csv, index_col=[0])
|
||||||
|
|
||||||
def replace(dst, *srcs):
|
def replace(dst, *srcs):
|
||||||
for src in srcs:
|
for src in srcs:
|
||||||
|
Loading…
Reference in New Issue
Block a user