Skip to content

Commit

Permalink
Using DataFrame() instead of DataFrame.from_records()
Browse files Browse the repository at this point in the history
  • Loading branch information
adamnarai committed Feb 9, 2022
1 parent fe2bede commit 0b3c5d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pingouin/correlation.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ def corr(x, y, alternative='two-sided', method='pearson', **kwargs):
stats['BF10'] = bayesfactor_pearson(r, n_clean, alternative=alternative)

# Convert to DataFrame
stats = pd.DataFrame.from_records(stats, index=[method])
stats = pd.DataFrame(stats, index=[method])

# Define order
col_keep = ['n', 'outliers', 'r', 'CI95%', 'p-val', 'BF10', 'power']
Expand Down Expand Up @@ -863,7 +863,7 @@ def partial_corr(data=None, x=None, y=None, covar=None, x_covar=None,
}

# Convert to DataFrame
stats = pd.DataFrame.from_records(stats, index=[method])
stats = pd.DataFrame(stats, index=[method])

# Define order
col_keep = ['n', 'r', 'CI95%', 'p-val']
Expand Down

0 comments on commit 0b3c5d1

Please sign in to comment.