Skip to content

Commit

Permalink
Merge pull request #63 from prismv/master
Browse files Browse the repository at this point in the history
fix wrong column order in TdmsFile.as_dataframe
  • Loading branch information
adamreeve committed Mar 18, 2017
2 parents 7dce01b + aa3c1f0 commit f107184
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nptdms/tdms.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,12 @@ def as_dataframe(self, time_index=False, absolute_time=False):

import pandas as pd

temp = {}
temp = []
for key, value in self.objects.items():
if value.has_data:
index = value.time_track(absolute_time) if time_index else None
temp[key] = pd.Series(data=value.data, index=index)
return pd.DataFrame.from_dict(temp)
temp.append((key, pd.Series(data=value.data, index=index)))
return pd.DataFrame.from_items(temp)


class _TdmsSegment(object):
Expand Down

0 comments on commit f107184

Please sign in to comment.