8000 Display all the differences · Issue #97 · gowerc/diffdf · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Display all the differences #97
Closed
Closed
@aassuied-ps

Description

@aassuied-ps

Is there an option to display all the differences between two dataframes instead of the 10 first?

Code:

library(dplyr)
library(diffdf)

df_base <- mtcars
df_compare <- mtcars %>% mutate(mpg = mpg*2)

diff <- diffdf::diffdf(
  base = df_base,
  compare = df_compare,
)

diff

Result:

Differences found between the objects!

A summary is given below.

Not all Values Compared Equal
All rows are shown in table below

  =============================
   Variable  No of Differences 
  -----------------------------
     mpg            32         
  -----------------------------


First 10 of 32 rows are shown in table below

  ========================================
   VARIABLE  ..ROWNUMBER..  BASE  COMPARE 
  ----------------------------------------
     mpg           1        21.0   42.0   
     mpg           2        21.0   42.0   
     mpg           3        22.8   45.6   
     mpg           4        21.4   42.8   
     mpg           5        18.7   37.4   
     mpg           6        18.1   36.2   
     mpg           7        14.3   28.6   
     mpg           8        24.4   48.8   
     mpg           9        22.8   45.6   
     mpg          10        19.2   38.4   
  ----------------------------------------

I did not find an option for this. I think it could be very usefull.

EDIT:

Apparently we can get the full dataframe of differences but I would prefer an option to have that directly in the report.

diff_df <- as.data.frame(diff)
diff_df

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0