-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transfer Datadict form to pandas.dataframe #387
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the branch before I approve and merge this PR
1 x2 y2 z2 | ||
2 x3 y3 z3 | ||
... | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow the style of documentation found in the file. Docstring is too indented, function name does not follow camel case, no mention of the parameter data, the break-lines are not consistent. Fix spelling mistakes: to _datafarme is nothing, lables.
plottr/data/datadict.py
Outdated
2 x3 y3 z3 | ||
... | ||
""" | ||
dat_set = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the missing a
dimension_check = False | ||
|
||
if np.size(data.data_vals(key)) > max_ele: | ||
max_ele = np.size(data.data_vals(key)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's usually nice to add a space in between control blocks, makes it more clear where something ends and the next thing starts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
edited file: datadict.py; edited functin: datadict_todataframe
transfer any dimension datadict into pandas.dataframe.
def datadict_todataframe(data: DataDict)->pd.DataFrame:
example of use:
DataDict A = ...
DataFrame B = datadict_todataframe(B)