Rdatatable / data.table

R's data.table package extends data.frame:
http://r-datatable.com
Mozilla Public License 2.0
3.58k stars 976 forks source link

Various enhancements to print.data.table #1523

Open MichaelChirico opened 8 years ago

MichaelChirico commented 8 years ago

Current task list:


Some Notes

3 (tabled pending clarification)

As I understand it, this issue is a request to prevent the console output from wrapping around (i.e., to force all columns to appear parallel, regardless of how wide the table is).

If that's the case, this is (AFAICT) impossible, since that's something done by RStudio/R itself. I for one certainly don't know of any way to alter this behavior.

If someone does know of a way to affect this, or if they think I'm mis-interpreting, please pipe up and we can have this taken care of.

7

As I see it there are two options here. One is to treat all key columns the same; the other is to treat secondary, tertiary, etc. keys separately.

Example output:

set.seed(01394)
DT <- data.table(key1 = rep(c("A","B"), each = 4),
                 key2 = rep(c("a","b"), 4),
                 V1 = nrorm(8), key = c("key1","key2"))

# Only demarcate key columns
DT
#    | key1 | | key2 |         V1
#1: |    A | |    a |  0.5994579
#2: |    A | |    a | -1.0898775
#3: |    A | |    b | -0.2285326
#4: |    A | |    b | -1.7858472
#5: |    B | |    a | -0.6269875
#6: |    B | |    a | -0.6633084
#7: |    B | |    b |  1.0367084
#8: |    B | |    b |  0.7364276

# Separately "emboss" keys based on key order
DT
#    | key1 | || key2 ||         V1
#1: |    A | ||    a ||  0.5994579
#2: |    A | ||    a || -1.0898775
#3: |    A | ||    b || -0.2285326
#4: |    A | ||    b || -1.7858472
#5: |    B | ||    a || -0.6269875
#6: |    B | ||    a || -0.6633084
#7: |    B | ||    b ||  1.0367084
#8: |    B | ||    b ||  0.7364276

And of course, add an option for deciding whether to demarcate with | or some other user's-choice character (*, +, etc.)

9 [DONE]

Some feedback from a closed PR that was a first stab at solving this:

From Arun regarding preferred options:

col.names = c("auto", "top", "none")

"auto": current behaviour

"top": only on top, data.frame-like

"none": no column names -- exclude rows in which column names would have been printed.

10 [DONE]

It would be nice to have an option to print a row under the row of column names which gives each column's stored type, as is currently (I understand) the default for the output of dplyr operations.

Example from dplyr:

library(dplyr)
DF <- data.frame(n = numeric(1), c1 = complex(1), i = integer(1),
                 f = factor(1), D = as.Date("2016-02-06"), c2 = character(1),
                 stringsAsFactors = FALSE)
tbl_df(DF)
# Source: local data frame [1 x 6]
#
#       n     c1     i      f          D    c2
#   (dbl) (cmpl) (int) (fctr)     (date) (chr) # <- this row
#1     0   0+0i     0      1 2016-02-06      

Current best alternative is to do sapply(DF, class), but it's nice to have a preview of the data wit this extra information.

11

This seems closely related to 3. Current plan is to implement this as an alternative to 3 since it seems more tangible/doable.

Via @nverno:

Would it be useful for head.data.table to have an option to print only the head of columns that fit the screen width, and summarise the rest? I was imagining something like the printed output from the head of a tbl_df in dplyr. I think it is nice for tables with many columns.

and the guiding example from Arun:

require(data.table)
dt = setDT(lapply(1:100, function(x) 1:3))
dt
dplyr::tbl_dt(dt)

12

Currently covered by @jangorecki's PR #1448; Jan, assuming #1529 is merged first, could you edit the print.data.table man page for your PR?

jangorecki commented 5 years ago

The less points is defined in scope the more easy is to merge a PR for it. Definitely it make sense to separate points which may result in breaking change (if any) from those for which default behaviour will not change.

MichaelChirico commented 5 years ago

this won't be done in a single PR though, but rather one by one

On Mon, Feb 4, 2019, 12:23 PM Jan Gorecki <notifications@github.com wrote:

The less points is defined in scope the more easy is to merge a PR for it. Definitely it make sense to separate points which may result in breaking change (if any) from those for which default behaviour will not change.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Rdatatable/data.table/issues/1523#issuecomment-460127326, or mute the thread https://github.com/notifications/unsubscribe-auth/AHQQdeNB5EZPMn44zsIfag--2jsQwZTyks5vJ7WmgaJpZM4HUz9_ .

franknarf1 commented 5 years ago

As an extension to @fparages' https://github.com/Rdatatable/data.table/pull/3500 (addressing the timezone display item in the OP of this issue/thread), it might be nice to also support the tz being printed in the class header, <POSc:-07:00> or <POSc:PDT>, and not in the column (to save horizontal space), eg when class=tz=TRUE.

MichaelChirico commented 5 years ago

^ related: #2842

randomgambit commented 5 years ago

That would be awesome!

tdhock commented 4 years ago

hi all I don't know if you care but I noticed a bug in print.data.table(col.names="none") when there are lots of columns. minimal code is:

library(data.table)
x <- 1:30
DT <- data.table(t(x))
print(DT, col.names="none")

output on my system is:

th798@cmp2986 MINGW64 ~/R
$ R --vanilla < datatable-print-bug.R

R version 3.6.1 (2019-07-05) -- "Action of the Toes"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(data.table)
> x <- 1:30
> DT <- data.table(t(x))
> print(DT, col.names="none")
1:  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21
   V22 V23 V24 V25 V26 V27 V28 V29 V30
1:  22  23  24  25  26  27  28  29  30
> 
]0;MINGW64:/c/Users/th798/R
th798@cmp2986 MINGW64 ~/R
$ 

You can see in the output above that the column names V22 through V30 are printed, but I expected they should not be. What I expected:

> print(DT, col.names="none")
1:  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21
1:  22  23  24  25  26  27  28  29  30
> 
avimallu commented 3 years ago

Is there any scope to add a dplyr::glimpse equivalent (I don't see it in the list)? While I most certainly can use dplyr for this purpose, I will need to install a bunch of dependencies to get the function. A use case is highlighted below (note: downloads ~4MB to system).

download.file(
  "https://download.cms.gov/nppes/NPPES_Data_Dissemination_120720_121320_Weekly.zip",
  "file.zip")

data <- fread("unzip -cq file.zip npidata_pfile_20201207-20201213.csv")

data.table's default print method gives a very long output that is not really helpful in understanding the contents of the file.

View output

```R > data NPI Entity Type Code Replacement NPI Employer Identification Number (EIN) 1: 1134691124 2 NA 2: 1124623970 2 NA 3: 1154927192 2 NA Provider Organization Name (Legal Business Name) Provider Last Name (Legal Name) Provider First Name Provider Middle Name 1: SOCAL BEHAVIORAL MEDICINE 2: FULL OF GREATS TRANSPORT LLC FOG TRANSPORT 3: 4000 MOUNT ELENA CIRCLE CORONA, CA 92882 Provider Name Prefix Text Provider Name Suffix Text Provider Credential Text Provider Other Organization Name 1: SOCAL BEHAVIORAL MEDICINE 2: 3: Provider Other Organization Name Type Code Provider Other Last Name Provider Other First Name Provider Other Middle Name 1: 3 2: NA 3: NA Provider Other Name Prefix Text Provider Other Name Suffix Text Provider Other Credential Text 1: 2: 3: Provider Other Last Name Type Code Provider First Line Business Mailing Address 1: NA 10650 REAGAN ST UNIT 824 2: NA 6609 W BROOKHART WAY 3: NA 4000 MOUNT ELENA CIR Provider Second Line Business Mailing Address Provider Business Mailing Address City Name 1: LOS ALAMITOS 2: PHOENIX 3: CORONA Provider Business Mailing Address State Name Provider Business Mailing Address Postal Code 1: CA 907208844 2: AZ 850837403 3: CA 928827916 Provider Business Mailing Address Country Code (If outside U.S.) Provider Business Mailing Address Telephone Number 1: US 2: US 5053079984 3: US 6269935823 Provider Business Mailing Address Fax Number Provider First Line Business Practice Location Address 1: 234 S PACIFIC COAST HWY STE 202 2: 4807187714 6609 W BROOKHART WAY 3: 4000 MOUNT ELENA CIR Provider Second Line Business Practice Location Address Provider Business Practice Location Address City Name 1: REDONDO BEACH 2: PHOENIX 3: CORONA Provider Business Practice Location Address State Name Provider Business Practice Location Address Postal Code 1: CA 902777001 2: AZ 850837403 3: CA 928827916 Provider Business Practice Location Address Country Code (If outside U.S.) 1: US 2: US 3: US Provider Business Practice Location Address Telephone Number Provider Business Practice Location Address Fax Number 1: 3106985252 2: 5053079984 4807187714 3: 6269935823 Provider Enumeration Date Last Update Date NPI Deactivation Reason Code NPI Deactivation Date NPI Reactivation Date 1: 01/01/2019 12/07/2020 NA 2: 12/01/2020 12/07/2020 NA 3: 12/07/2020 12/07/2020 NA Provider Gender Code Authorized Official Last Name Authorized Official First Name Authorized Official Middle Name 1: HULST GINGER 2: HURT TYRREIA S 3: YOUSSEF ALICE K Authorized Official Title or Position Authorized Official Telephone Number Healthcare Provider Taxonomy Code_1 1: CO-OWNER 3106985252 363LF0000X 2: MEMBER 5053079984 343900000X 3: OWNER 6269935823 172V00000X Provider License Number_1 Provider License Number State Code_1 Healthcare Provider Primary Taxonomy Switch_1 1: N 2: Y 3: Y Healthcare Provider Taxonomy Code_2 Provider License Number_2 Provider License Number State Code_2 1: 207RA0401X 2: 3: Healthcare Provider Primary Taxonomy Switch_2 Healthcare Provider Taxonomy Code_3 Provider License Number_3 1: Y 2: 3: Provider License Number State Code_3 Healthcare Provider Primary Taxonomy Switch_3 Healthcare Provider Taxonomy Code_4 1: 2: 3: Provider License Number_4 Provider License Number State Code_4 Healthcare Provider Primary Taxonomy Switch_4 1: 2: 3: Healthcare Provider Taxonomy Code_5 Provider License Number_5 Provider License Number State Code_5 1: 2: 3: Healthcare Provider Primary Taxonomy Switch_5 Healthcare Provider Taxonomy Code_6 Provider License Number_6 1: 2: 3: Provider License Number State Code_6 Healthcare Provider Primary Taxonomy Switch_6 Healthcare Provider Taxonomy Code_7 1: 2: 3: Provider License Number_7 Provider License Number State Code_7 Healthcare Provider Primary Taxonomy Switch_7 1: 2: 3: Healthcare Provider Taxonomy Code_8 Provider License Number_8 Provider License Number State Code_8 1: 2: 3: Healthcare Provider Primary Taxonomy Switch_8 Healthcare Provider Taxonomy Code_9 Provider License Number_9 1: 2: 3: Provider License Number State Code_9 Healthcare Provider Primary Taxonomy Switch_9 Healthcare Provider Taxonomy Code_10 1: 2: 3: Provider License Number_10 Provider License Number State Code_10 Healthcare Provider Primary Taxonomy Switch_10 1: 2: 3: Healthcare Provider Taxonomy Code_11 Provider License Number_11 Provider License Number State Code_11 1: 2: 3: Healthcare Provider Primary Taxonomy Switch_11 Healthcare Provider Taxonomy Code_12 Provider License Number_12 1: 2: 3: Provider License Number State Code_12 Healthcare Provider Primary Taxonomy Switch_12 Healthcare Provider Taxonomy Code_13 1: 2: 3: Provider License Number_13 Provider License Number State Code_13 Healthcare Provider Primary Taxonomy Switch_13 1: 2: 3: Healthcare Provider Taxonomy Code_14 Provider License Number_14 Provider License Number State Code_14 1: 2: 3: Healthcare Provider Primary Taxonomy Switch_14 Healthcare Provider Taxonomy Code_15 Provider License Number_15 1: 2: 3: Provider License Number State Code_15 Healthcare Provider Primary Taxonomy Switch_15 Other Provider Identifier_1 1: 2: 3: Other Provider Identifier Type Code_1 Other Provider Identifier State_1 Other Provider Identifier Issuer_1 1: NA 2: NA 3: NA Other Provider Identifier_2 Other Provider Identifier Type Code_2 Other Provider Identifier State_2 1: NA 2: NA 3: NA Other Provider Identifier Issuer_2 Other Provider Identifier_3 Other Provider Identifier Type Code_3 1: NA 2: NA 3: NA Other Provider Identifier State_3 Other Provider Identifier Issuer_3 Other Provider Identifier_4 1: 2: 3: Other Provider Identifier Type Code_4 Other Provider Identifier State_4 Other Provider Identifier Issuer_4 1: NA 2: NA 3: NA Other Provider Identifier_5 Other Provider Identifier Type Code_5 Other Provider Identifier State_5 1: NA 2: NA 3: NA Other Provider Identifier Issuer_5 Other Provider Identifier_6 Other Provider Identifier Type Code_6 1: NA 2: NA 3: NA Other Provider Identifier State_6 Other Provider Identifier Issuer_6 Other Provider Identifier_7 1: 2: 3: Other Provider Identifier Type Code_7 Other Provider Identifier State_7 Other Provider Identifier Issuer_7 1: NA 2: NA 3: NA Other Provider Identifier_8 Other Provider Identifier Type Code_8 Other Provider Identifier State_8 1: NA 2: NA 3: NA Other Provider Identifier Issuer_8 Other Provider Identifier_9 Other Provider Identifier Type Code_9 1: NA 2: NA 3: NA Other Provider Identifier State_9 Other Provider Identifier Issuer_9 Other Provider Identifier_10 1: 2: 3: Other Provider Identifier Type Code_10 Other Provider Identifier State_10 Other Provider Identifier Issuer_10 1: NA 2: NA 3: NA Other Provider Identifier_11 Other Provider Identifier Type Code_11 Other Provider Identifier State_11 1: NA 2: NA 3: NA Other Provider Identifier Issuer_11 Other Provider Identifier_12 Other Provider Identifier Type Code_12 1: NA 2: NA 3: NA Other Provider Identifier State_12 Other Provider Identifier Issuer_12 Other Provider Identifier_13 1: 2: 3: Other Provider Identifier Type Code_13 Other Provider Identifier State_13 Other Provider Identifier Issuer_13 1: NA 2: NA 3: NA Other Provider Identifier_14 Other Provider Identifier Type Code_14 Other Provider Identifier State_14 1: NA 2: NA 3: NA Other Provider Identifier Issuer_14 Other Provider Identifier_15 Other Provider Identifier Type Code_15 1: NA 2: NA 3: NA Other Provider Identifier State_15 Other Provider Identifier Issuer_15 Other Provider Identifier_16 1: 2: 3: Other Provider Identifier Type Code_16 Other Provider Identifier State_16 Other Provider Identifier Issuer_16 1: NA 2: NA 3: NA Other Provider Identifier_17 Other Provider Identifier Type Code_17 Other Provider Identifier State_17 1: NA 2: NA 3: NA Other Provider Identifier Issuer_17 Other Provider Identifier_18 Other Provider Identifier Type Code_18 1: NA 2: NA 3: NA Other Provider Identifier State_18 Other Provider Identifier Issuer_18 Other Provider Identifier_19 1: 2: 3: Other Provider Identifier Type Code_19 Other Provider Identifier State_19 Other Provider Identifier Issuer_19 1: NA 2: NA 3: NA Other Provider Identifier_20 Other Provider Identifier Type Code_20 Other Provider Identifier State_20 1: NA NA 2: NA NA 3: NA NA Other Provider Identifier Issuer_20 Other Provider Identifier_21 Other Provider Identifier Type Code_21 1: NA 2: NA 3: NA Other Provider Identifier State_21 Other Provider Identifier Issuer_21 Other Provider Identifier_22 1: NA 2: NA 3: NA Other Provider Identifier Type Code_22 Other Provider Identifier State_22 Other Provider Identifier Issuer_22 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier_23 Other Provider Identifier Type Code_23 Other Provider Identifier State_23 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier Issuer_23 Other Provider Identifier_24 Other Provider Identifier Type Code_24 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier State_24 Other Provider Identifier Issuer_24 Other Provider Identifier_25 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier Type Code_25 Other Provider Identifier State_25 Other Provider Identifier Issuer_25 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier_26 Other Provider Identifier Type Code_26 Other Provider Identifier State_26 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier Issuer_26 Other Provider Identifier_27 Other Provider Identifier Type Code_27 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier State_27 Other Provider Identifier Issuer_27 Other Provider Identifier_28 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier Type Code_28 Other Provider Identifier State_28 Other Provider Identifier Issuer_28 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier_29 Other Provider Identifier Type Code_29 Other Provider Identifier State_29 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier Issuer_29 Other Provider Identifier_30 Other Provider Identifier Type Code_30 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier State_30 Other Provider Identifier Issuer_30 Other Provider Identifier_31 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier Type Code_31 Other Provider Identifier State_31 Other Provider Identifier Issuer_31 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier_32 Other Provider Identifier Type Code_32 Other Provider Identifier State_32 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier Issuer_32 Other Provider Identifier_33 Other Provider Identifier Type Code_33 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier State_33 Other Provider Identifier Issuer_33 Other Provider Identifier_34 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier Type Code_34 Other Provider Identifier State_34 Other Provider Identifier Issuer_34 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier_35 Other Provider Identifier Type Code_35 Other Provider Identifier State_35 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier Issuer_35 Other Provider Identifier_36 Other Provider Identifier Type Code_36 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier State_36 Other Provider Identifier Issuer_36 Other Provider Identifier_37 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier Type Code_37 Other Provider Identifier State_37 Other Provider Identifier Issuer_37 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier_38 Other Provider Identifier Type Code_38 Other Provider Identifier State_38 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier Issuer_38 Other Provider Identifier_39 Other Provider Identifier Type Code_39 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier State_39 Other Provider Identifier Issuer_39 Other Provider Identifier_40 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier Type Code_40 Other Provider Identifier State_40 Other Provider Identifier Issuer_40 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier_41 Other Provider Identifier Type Code_41 Other Provider Identifier State_41 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier Issuer_41 Other Provider Identifier_42 Other Provider Identifier Type Code_42 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier State_42 Other Provider Identifier Issuer_42 Other Provider Identifier_43 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier Type Code_43 Other Provider Identifier State_43 Other Provider Identifier Issuer_43 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier_44 Other Provider Identifier Type Code_44 Other Provider Identifier State_44 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier Issuer_44 Other Provider Identifier_45 Other Provider Identifier Type Code_45 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier State_45 Other Provider Identifier Issuer_45 Other Provider Identifier_46 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier Type Code_46 Other Provider Identifier State_46 Other Provider Identifier Issuer_46 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier_47 Other Provider Identifier Type Code_47 Other Provider Identifier State_47 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier Issuer_47 Other Provider Identifier_48 Other Provider Identifier Type Code_48 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier State_48 Other Provider Identifier Issuer_48 Other Provider Identifier_49 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier Type Code_49 Other Provider Identifier State_49 Other Provider Identifier Issuer_49 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier_50 Other Provider Identifier Type Code_50 Other Provider Identifier State_50 1: NA NA NA 2: NA NA NA 3: NA NA NA Other Provider Identifier Issuer_50 Is Sole Proprietor Is Organization Subpart Parent Organization LBN 1: NA N 2: NA N 3: NA N Parent Organization TIN Authorized Official Name Prefix Text Authorized Official Name Suffix Text 1: 2: MRS. 3: Authorized Official Credential Text Healthcare Provider Taxonomy Group_1 Healthcare Provider Taxonomy Group_2 1: NP 193200000X MULTI-SPECIALTY GROUP 193200000X MULTI-SPECIALTY GROUP 2: 3: 193200000X MULTI-SPECIALTY GROUP Healthcare Provider Taxonomy Group_3 Healthcare Provider Taxonomy Group_4 Healthcare Provider Taxonomy Group_5 1: 2: 3: Healthcare Provider Taxonomy Group_6 Healthcare Provider Taxonomy Group_7 Healthcare Provider Taxonomy Group_8 1: 2: 3: Healthcare Provider Taxonomy Group_9 Healthcare Provider Taxonomy Group_10 Healthcare Provider Taxonomy Group_11 1: 2: 3: Healthcare Provider Taxonomy Group_12 Healthcare Provider Taxonomy Group_13 Healthcare Provider Taxonomy Group_14 1: 2: 3: Healthcare Provider Taxonomy Group_15 Certification Date 1: 12/07/2020 2: 12/07/2020 3: 12/07/2020 [ reached getOption("max.print") -- omitted 8 rows ] ```

dplyr::glimpse also gives a long output, but still very much readable.

View output

```R > dplyr::glimpse(data) Rows: 21,806 Columns: 330 $ NPI 1134691124, 1124623970, 1154927192, 1144... $ `Entity Type Code` 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 1, 1, 1, 1... $ `Replacement NPI` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Employer Identification Number (EIN)` "", "", "", "... $ `Provider Organization Name (Legal Business Name)` "SOCAL BEHAVIORAL MEDICINE", "FULL OF GR... $ `Provider Last Name (Legal Name)` "", "", "", "SLAT", "", "CARABBACAN", ""... $ `Provider First Name` "", "", "", "STACY", "", "NICCOLO MCWIN"... $ `Provider Middle Name` "", "", "", "KING", "", "MADRIGAL", "", ... $ `Provider Name Prefix Text` "", "", "", "", "", "", "", "", "", "", ... $ `Provider Name Suffix Text` "", "", "", "", "", "", "", "", "", "", ... $ `Provider Credential Text` "", "", "", "MD", "", "", "", "", "", "D... $ `Provider Other Organization Name` "SOCAL BEHAVIORAL MEDICINE", "", "", "",... $ `Provider Other Organization Name Type Code` 3, NA, NA, NA, NA, NA, NA, NA, 3, NA, NA... $ `Provider Other Last Name` "", "", "", "KING", "", "", "", "", "", ... $ `Provider Other First Name` "", "", "", "STACY", "", "", "", "", "",... $ `Provider Other Middle Name` "", "", "", "MARIE", "", "", "", "", "",... $ `Provider Other Name Prefix Text` "", "", "", "", "", "", "", "", "", "", ... $ `Provider Other Name Suffix Text` "", "", "", "", "", "", "", "", "", "", ... $ `Provider Other Credential Text` "", "", "", "M.D.", "", "", "", "", "", ... $ `Provider Other Last Name Type Code` NA, NA, NA, 1, NA, NA, NA, NA, NA, NA, N... $ `Provider First Line Business Mailing Address` "10650 REAGAN ST UNIT 824", "6609 W BROO... $ `Provider Second Line Business Mailing Address` "", "", "", "", "", "", "", "", "", "", ... $ `Provider Business Mailing Address City Name` "LOS ALAMITOS", "PHOENIX", "CORONA", "NE... $ `Provider Business Mailing Address State Name` "CA", "AZ", "CA", "VA", "NJ", "CA", "CO"... $ `Provider Business Mailing Address Postal Code` "907208844", "850837403", "928827916", "... $ `Provider Business Mailing Address Country Code (If outside U.S.)` "US", "US", "US", "US", "US", "US", "US"... $ `Provider Business Mailing Address Telephone Number` "", "5053079984", "6269935823", "7573165... $ `Provider Business Mailing Address Fax Number` NA, 4807187714, NA, NA, NA, NA, 970484... $ `Provider First Line Business Practice Location Address` "234 S PACIFIC COAST HWY STE 202", "6609... $ `Provider Second Line Business Practice Location Address` "", "", "", "", "", "", "", "", "", "", ... $ `Provider Business Practice Location Address City Name` "REDONDO BEACH", "PHOENIX", "CORONA", "W... $ `Provider Business Practice Location Address State Name` "CA", "AZ", "CA", "VA", "NJ", "CA", "CO"... $ `Provider Business Practice Location Address Postal Code` "902777001", "850837403", "928827916", "... $ `Provider Business Practice Location Address Country Code (If outside U.S.)` "US", "US", "US", "US", "US", "US", "US"... $ `Provider Business Practice Location Address Telephone Number` "3106985252", "5053079984", "6269935823"... $ `Provider Business Practice Location Address Fax Number` NA, 4807187714, NA, NA, NA, 8585389751... $ `Provider Enumeration Date` "01/01/2019", "12/01/2020", "12/07/2020"... $ `Last Update Date` "12/07/2020", "12/07/2020", "12/07/2020"... $ `NPI Deactivation Reason Code` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `NPI Deactivation Date` "", "", "", "", "", "", "", "", "", "", ... $ `NPI Reactivation Date` "", "", "", "", "", "", "", "", "", "", ... $ `Provider Gender Code` "", "", "", "F", "", "M", "", "", "", "F... $ `Authorized Official Last Name` "HULST", "HURT", "YOUSSEF", "", "TIMOTHE... $ `Authorized Official First Name` "GINGER", "TYRREIA", "ALICE", "", "BEBYT... $ `Authorized Official Middle Name` "", "S", "K", "", "", "", "LYNN", "LYNN"... $ `Authorized Official Title or Position` "CO-OWNER", "MEMBER", "OWNER", "", "MANA... $ `Authorized Official Telephone Number` 3106985252, 5053079984, 6269935823, NA... $ `Healthcare Provider Taxonomy Code_1` "363LF0000X", "343900000X", "172V00000X"... $ `Provider License Number_1` "", "", "", "48977", "", "83591", "", ""... $ `Provider License Number State Code_1` "", "", "", "CT", "", "CA", "", "", "MN"... $ `Healthcare Provider Primary Taxonomy Switch_1` "N", "Y", "Y", "Y", "N", "Y", "Y", "Y", ... $ `Healthcare Provider Taxonomy Code_2` "207RA0401X", "", "", "", "", "", "", ""... $ `Provider License Number_2` "", "", "", "", "", "", "", "", "", "156... $ `Provider License Number State Code_2` "", "", "", "", "", "", "", "", "", "MA"... $ `Healthcare Provider Primary Taxonomy Switch_2` "Y", "", "", "", "", "", "", "", "", "N"... $ `Healthcare Provider Taxonomy Code_3` "", "", "", "", "", "", "", "", "", "", ... $ `Provider License Number_3` "", "", "", "", "", "", "", "", "", "", ... $ `Provider License Number State Code_3` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Primary Taxonomy Switch_3` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Taxonomy Code_4` "", "", "", "", "", "", "", "", "", "", ... $ `Provider License Number_4` "", "", "", "", "", "", "", "", "", "", ... $ `Provider License Number State Code_4` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Primary Taxonomy Switch_4` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Taxonomy Code_5` "", "", "", "", "", "", "", "", "", "", ... $ `Provider License Number_5` "", "", "", "", "", "", "", "", "", "", ... $ `Provider License Number State Code_5` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Primary Taxonomy Switch_5` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Taxonomy Code_6` "", "", "", "", "", "", "", "", "", "", ... $ `Provider License Number_6` "", "", "", "", "", "", "", "", "", "", ... $ `Provider License Number State Code_6` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Primary Taxonomy Switch_6` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Taxonomy Code_7` "", "", "", "", "", "", "", "", "", "", ... $ `Provider License Number_7` "", "", "", "", "", "", "", "", "", "", ... $ `Provider License Number State Code_7` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Primary Taxonomy Switch_7` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Taxonomy Code_8` "", "", "", "", "", "", "", "", "", "", ... $ `Provider License Number_8` "", "", "", "", "", "", "", "", "", "", ... $ `Provider License Number State Code_8` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Primary Taxonomy Switch_8` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Taxonomy Code_9` "", "", "", "", "", "", "", "", "", "", ... $ `Provider License Number_9` "", "", "", "", "", "", "", "", "", "", ... $ `Provider License Number State Code_9` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Primary Taxonomy Switch_9` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Taxonomy Code_10` "", "", "", "", "", "", "", "", "", "", ... $ `Provider License Number_10` "", "", "", "", "", "", "", "", "", "", ... $ `Provider License Number State Code_10` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Primary Taxonomy Switch_10` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Taxonomy Code_11` "", "", "", "", "", "", "", "", "", "", ... $ `Provider License Number_11` "", "", "", "", "", "", "", "", "", "", ... $ `Provider License Number State Code_11` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Primary Taxonomy Switch_11` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Taxonomy Code_12` "", "", "", "", "", "", "", "", "", "", ... $ `Provider License Number_12` "", "", "", "", "", "", "", "", "", "", ... $ `Provider License Number State Code_12` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Primary Taxonomy Switch_12` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Taxonomy Code_13` "", "", "", "", "", "", "", "", "", "", ... $ `Provider License Number_13` "", "", "", "", "", "", "", "", "", "", ... $ `Provider License Number State Code_13` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Primary Taxonomy Switch_13` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Taxonomy Code_14` "", "", "", "", "", "", "", "", "", "", ... $ `Provider License Number_14` "", "", "", "", "", "", "", "", "", "", ... $ `Provider License Number State Code_14` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Primary Taxonomy Switch_14` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Taxonomy Code_15` "", "", "", "", "", "", "", "", "", "", ... $ `Provider License Number_15` "", "", "", "", "", "", "", "", "", "", ... $ `Provider License Number State Code_15` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Primary Taxonomy Switch_15` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier_1` "", "", "", "", "", "", "", "", "381417"... $ `Other Provider Identifier Type Code_1` NA, NA, NA, NA, NA, NA, NA, NA, 1, NA, N... $ `Other Provider Identifier State_1` "", "", "", "", "", "", "", "", "MN", ""... $ `Other Provider Identifier Issuer_1` "", "", "", "", "", "", "", "", "MINNESO... $ `Other Provider Identifier_2` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Type Code_2` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_2` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Issuer_2` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier_3` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Type Code_3` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_3` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Issuer_3` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier_4` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Type Code_4` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_4` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Issuer_4` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier_5` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Type Code_5` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_5` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Issuer_5` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier_6` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Type Code_6` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_6` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Issuer_6` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier_7` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Type Code_7` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_7` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Issuer_7` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier_8` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Type Code_8` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_8` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Issuer_8` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier_9` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Type Code_9` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_9` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Issuer_9` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier_10` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Type Code_10` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_10` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Issuer_10` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier_11` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Type Code_11` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_11` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Issuer_11` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier_12` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Type Code_12` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_12` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Issuer_12` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier_13` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Type Code_13` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_13` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Issuer_13` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier_14` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Type Code_14` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_14` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Issuer_14` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier_15` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Type Code_15` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_15` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Issuer_15` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier_16` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Type Code_16` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_16` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Issuer_16` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier_17` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Type Code_17` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_17` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Issuer_17` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier_18` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Type Code_18` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_18` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Issuer_18` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier_19` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Type Code_19` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_19` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Issuer_19` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier_20` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_20` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_20` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Issuer_20` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier_21` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Type Code_21` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_21` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier Issuer_21` "", "", "", "", "", "", "", "", "", "", ... $ `Other Provider Identifier_22` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_22` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_22` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_22` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier_23` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_23` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_23` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_23` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier_24` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_24` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_24` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_24` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier_25` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_25` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_25` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_25` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier_26` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_26` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_26` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_26` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier_27` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_27` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_27` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_27` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier_28` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_28` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_28` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_28` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier_29` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_29` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_29` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_29` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier_30` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_30` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_30` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_30` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier_31` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_31` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_31` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_31` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier_32` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_32` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_32` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_32` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier_33` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_33` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_33` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_33` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier_34` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_34` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_34` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_34` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier_35` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_35` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_35` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_35` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier_36` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_36` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_36` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_36` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier_37` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_37` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_37` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_37` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier_38` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_38` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_38` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_38` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier_39` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_39` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_39` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_39` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier_40` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_40` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_40` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_40` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier_41` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_41` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_41` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_41` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier_42` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_42` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_42` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_42` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier_43` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_43` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_43` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_43` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier_44` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_44` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_44` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_44` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier_45` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_45` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_45` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_45` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier_46` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_46` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_46` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_46` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier_47` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_47` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_47` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_47` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier_48` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_48` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_48` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_48` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier_49` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_49` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_49` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_49` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier_50` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Type Code_50` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier State_50` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Other Provider Identifier Issuer_50` NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, ... $ `Is Sole Proprietor` "", "", "", "N", "", "N", "", "", "", "N... $ `Is Organization Subpart` "N", "N", "N", "", "N", "", "N", "N", "N... $ `Parent Organization LBN` "", "", "", "", "", "", "", "", "", "", ... $ `Parent Organization TIN` "", "", "", "", "", "", "", "", "", "", ... $ `Authorized Official Name Prefix Text` "", "MRS.", "", "", "", "", "", "", "", ... $ `Authorized Official Name Suffix Text` "", "", "", "", "", "", "", "", "", "", ... $ `Authorized Official Credential Text` "NP", "", "", "", "LPN", "", "", "", "RN... $ `Healthcare Provider Taxonomy Group_1` "193200000X MULTI-SPECIALTY GROUP", "", ... $ `Healthcare Provider Taxonomy Group_2` "193200000X MULTI-SPECIALTY GROUP", "", ... $ `Healthcare Provider Taxonomy Group_3` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Taxonomy Group_4` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Taxonomy Group_5` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Taxonomy Group_6` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Taxonomy Group_7` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Taxonomy Group_8` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Taxonomy Group_9` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Taxonomy Group_10` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Taxonomy Group_11` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Taxonomy Group_12` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Taxonomy Group_13` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Taxonomy Group_14` "", "", "", "", "", "", "", "", "", "", ... $ `Healthcare Provider Taxonomy Group_15` "", "", "", "", "", "", "", "", "", "", ... $ `Certification Date` "12/07/2020", "12/07/2020", "12/07/2020"... ```

In my opinion, the latter gives a summary of the dataset that proves helpful, from understanding the contents as well as column names of the data. Note that this isn't a dataset that can be melted down. I could use str as an alternative, but it doesn't print very neatly i.e. data from a single column is shown on the next row on the console (not seen here), eg:

View output

```R Classes ‘data.table’ and 'data.frame': 21806 obs. of 330 variables: $ NPI : int 1134691124 1124623970 1154927192 1144411422 1245836287 1376144014 1063018000 1972109916 1649792151 1275649105 ... $ Entity Type Code : int 2 2 2 1 2 1 2 2 2 1 ... $ Replacement NPI : logi NA NA NA NA NA NA ... $ Employer Identification Number (EIN) : chr "" "" "" "" ... $ Provider Organization Name (Legal Business Name) : chr "SOCAL BEHAVIORAL MEDICINE" "FULL OF GREATS TRANSPORT LLC FOG TRANSPORT" "4000 MOUNT ELENA CIRCLE CORONA, CA 92882" "" ... $ Provider Last Name (Legal Name) : chr "" "" "" "SLAT" ... $ Provider First Name : chr "" "" "" "STACY" ... $ Provider Middle Name : chr "" "" "" "KING" ... $ Provider Name Prefix Text : chr "" "" "" "" ... $ Provider Name Suffix Text : chr "" "" "" "" ... $ Provider Credential Text : chr "" "" "" "MD" ... $ Provider Other Organization Name : chr "SOCAL BEHAVIORAL MEDICINE" "" "" "" ... $ Provider Other Organization Name Type Code : int 3 NA NA NA NA NA NA NA 3 NA ... $ Provider Other Last Name : chr "" "" "" "KING" ... $ Provider Other First Name : chr "" "" "" "STACY" ... $ Provider Other Middle Name : chr "" "" "" "MARIE" ... $ Provider Other Name Prefix Text : chr "" "" "" "" ... $ Provider Other Name Suffix Text : chr "" "" "" "" ... $ Provider Other Credential Text : chr "" "" "" "M.D." ... $ Provider Other Last Name Type Code : int NA NA NA 1 NA NA NA NA NA NA ... $ Provider First Line Business Mailing Address : chr "10650 REAGAN ST UNIT 824" "6609 W BROOKHART WAY" "4000 MOUNT ELENA CIR" "856 J CLYDE MORRIS BLVD STE A" ... $ Provider Second Line Business Mailing Address : chr "" "" "" "" ... $ Provider Business Mailing Address City Name : chr "LOS ALAMITOS" "PHOENIX" "CORONA" "NEWPORT NEWS" ... $ Provider Business Mailing Address State Name : chr "CA" "AZ" "CA" "VA" ... $ Provider Business Mailing Address Postal Code : chr "907208844" "850837403" "928827916" "236011318" ... $ Provider Business Mailing Address Country Code (If outside U.S.) : chr "US" "US" "US" "US" ... $ Provider Business Mailing Address Telephone Number : chr "" "5053079984" "6269935823" "7573165800" ... $ Provider Business Mailing Address Fax Number :integer64 NA 4807187714 NA NA NA NA 9704842251 9704842251 ... $ Provider First Line Business Practice Location Address : chr "234 S PACIFIC COAST HWY STE 202" "6609 W BROOKHART WAY" "4000 MOUNT ELENA CIR" "120 KINGS WAY STE 3400" ... $ Provider Second Line Business Practice Location Address : chr "" "" "" "" ... $ Provider Business Practice Location Address City Name : chr "REDONDO BEACH" "PHOENIX" "CORONA" "WILLIAMSBURG" ... $ Provider Business Practice Location Address State Name : chr "CA" "AZ" "CA" "VA" ... $ Provider Business Practice Location Address Postal Code : chr "902777001" "850837403" "928827916" "231852511" ... $ Provider Business Practice Location Address Country Code (If outside U.S.): chr "US" "US" "US" "US" ... $ Provider Business Practice Location Address Telephone Number : chr "3106985252" "5053079984" "6269935823" "7572535600" ... $ Provider Business Practice Location Address Fax Number :integer64 NA 4807187714 NA NA NA 8585389751 3036660911 3036660911 ... $ Provider Enumeration Date : chr "01/01/2019" "12/01/2020" "12/07/2020" "08/05/2007" ... $ Last Update Date : chr "12/07/2020" "12/07/2020" "12/07/2020" "12/07/2020" ... $ NPI Deactivation Reason Code : logi NA NA NA NA NA NA ... $ NPI Deactivation Date : chr "" "" "" "" ... $ NPI Reactivation Date : chr "" "" "" "" ... $ Provider Gender Code : chr "" "" "" "F" ... $ Authorized Official Last Name : chr "HULST" "HURT" "YOUSSEF" "" ... $ Authorized Official First Name : chr "GINGER" "TYRREIA" "ALICE" "" ... $ Authorized Official Middle Name : chr "" "S" "K" "" ... $ Authorized Official Title or Position : chr "CO-OWNER" "MEMBER" "OWNER" "" ... $ Authorized Official Telephone Number :integer64 3106985252 5053079984 6269935823 NA 8626840895 NA 9704304431 9704304431 ... $ Healthcare Provider Taxonomy Code_1 : chr "363LF0000X" "343900000X" "172V00000X" "207V00000X" ... $ Provider License Number_1 : chr "" "" "" "48977" ... $ Provider License Number State Code_1 : chr "" "" "" "CT" ... $ Healthcare Provider Primary Taxonomy Switch_1 : chr "N" "Y" "Y" "Y" ... $ Healthcare Provider Taxonomy Code_2 : chr "207RA0401X" "" "" "" ... $ Provider License Number_2 : chr "" "" "" "" ... $ Provider License Number State Code_2 : chr "" "" "" "" ... $ Healthcare Provider Primary Taxonomy Switch_2 : chr "Y" "" "" "" ... $ Healthcare Provider Taxonomy Code_3 : chr "" "" "" "" ... $ Provider License Number_3 : chr "" "" "" "" ... $ Provider License Number State Code_3 : chr "" "" "" "" ... $ Healthcare Provider Primary Taxonomy Switch_3 : chr "" "" "" "" ... $ Healthcare Provider Taxonomy Code_4 : chr "" "" "" "" ... $ Provider License Number_4 : chr "" "" "" "" ... $ Provider License Number State Code_4 : chr "" "" "" "" ... $ Healthcare Provider Primary Taxonomy Switch_4 : chr "" "" "" "" ... $ Healthcare Provider Taxonomy Code_5 : chr "" "" "" "" ... $ Provider License Number_5 : chr "" "" "" "" ... $ Provider License Number State Code_5 : chr "" "" "" "" ... $ Healthcare Provider Primary Taxonomy Switch_5 : chr "" "" "" "" ... $ Healthcare Provider Taxonomy Code_6 : chr "" "" "" "" ... $ Provider License Number_6 : chr "" "" "" "" ... $ Provider License Number State Code_6 : chr "" "" "" "" ... $ Healthcare Provider Primary Taxonomy Switch_6 : chr "" "" "" "" ... $ Healthcare Provider Taxonomy Code_7 : chr "" "" "" "" ... $ Provider License Number_7 : chr "" "" "" "" ... $ Provider License Number State Code_7 : chr "" "" "" "" ... $ Healthcare Provider Primary Taxonomy Switch_7 : chr "" "" "" "" ... $ Healthcare Provider Taxonomy Code_8 : chr "" "" "" "" ... $ Provider License Number_8 : chr "" "" "" "" ... $ Provider License Number State Code_8 : chr "" "" "" "" ... $ Healthcare Provider Primary Taxonomy Switch_8 : chr "" "" "" "" ... $ Healthcare Provider Taxonomy Code_9 : chr "" "" "" "" ... $ Provider License Number_9 : chr "" "" "" "" ... $ Provider License Number State Code_9 : chr "" "" "" "" ... $ Healthcare Provider Primary Taxonomy Switch_9 : chr "" "" "" "" ... $ Healthcare Provider Taxonomy Code_10 : chr "" "" "" "" ... $ Provider License Number_10 : chr "" "" "" "" ... $ Provider License Number State Code_10 : chr "" "" "" "" ... $ Healthcare Provider Primary Taxonomy Switch_10 : chr "" "" "" "" ... $ Healthcare Provider Taxonomy Code_11 : chr "" "" "" "" ... $ Provider License Number_11 : chr "" "" "" "" ... $ Provider License Number State Code_11 : chr "" "" "" "" ... $ Healthcare Provider Primary Taxonomy Switch_11 : chr "" "" "" "" ... $ Healthcare Provider Taxonomy Code_12 : chr "" "" "" "" ... $ Provider License Number_12 : chr "" "" "" "" ... $ Provider License Number State Code_12 : chr "" "" "" "" ... $ Healthcare Provider Primary Taxonomy Switch_12 : chr "" "" "" "" ... $ Healthcare Provider Taxonomy Code_13 : chr "" "" "" "" ... $ Provider License Number_13 : chr "" "" "" "" ... $ Provider License Number State Code_13 : chr "" "" "" "" ... $ Healthcare Provider Primary Taxonomy Switch_13 : chr "" "" "" "" ... [list output truncated] - attr(*, ".internal.selfref")= ```

Will it be possible to add something like this for data.table to avoid the additional dependency that dplyr requires?

I also see that print.data.table is almost entirely R code - if this is something feasible without delving into C, I might be able to give it a stab - can someone provide some guidance on this? It can be a separate function (much better idea), or available as an option from getOption.

jangorecki commented 3 years ago

I think str is really good. It might not be polished as much as glimpse but maybe there is a possibility to improve it? changes in this function should be pretty safe because I don't think there are reasonable use cases to parse output of str. Its output is strictly to be read by humans and not a program. For me str works well enough already, but you can list your ideas for improvement and propose on R-devel.

avimallu commented 3 years ago

Oh, I wasn't planning on proposing any changes to R devel - only restricting it to data.table. Basically, creating a polished version of it for use in data.table without dependencies to help with the use case mentioned above. I just did a quick check online, it might be possible to implement it in R itself - would that be something that would be worth integrating into data.table?

jangorecki commented 3 years ago

I understand, my point was very subjective. That str does the job nicely, therefore might not be worth to re-implement it in data.table. And if something is missing in str, then maybe could be improved there before duplicating functionality in data.table. If R core will find suggested changes not relevant, and we agree that they are nice to have, then it will be good reason to implement as a part of data.table.

avimallu commented 3 years ago

Got it. The enhancement I am proposing makes sense only to tabular data. Matrices, vectors and lists wouldn't really benefit from it, so I doubt R core will really care about these changes. We wouldn't really be duplicating the functionality, but rather polishing it for a very specific use case of tabular data.

MichaelChirico commented 3 years ago

str has a method for data.frames -- what about data.table makes the proposed update not apply to data.frames?

By the way, are you aware of the trunc.cols argument to print.data.table? e.g. print(data, trunc.cols=TRUE). The default can be controlled by an option; I think we are undecided about whether to change the default at some point.

avimallu commented 3 years ago

I wasn't referring to the proposed update not applying to data.frame, but to tabular data in general. For example (purely subjective), in str, it makes sense to expand the components of a list column into its constituents. In my use-case, I am required to sometimes take a very superficial look on multiple wide tables with long columns, such as the one mentioned in my example, which glimpse provides for (albeit with the extra dependencies that I need to install). Such a kind of modification would require adjustments specific for data.frames and derived data types (eg. max.levels = 1 instead of NA, or truncating column names if they are too long that the data moves to the next line), which is probably not in line with suggesting a change for R base.

I am aware of the trunc.cols argument to print, and it isn't quite what I'm looking for, and I'm not really a fan of making it the default - I understand the use case in #2608, however, in my case I actually need to glimpse the entire table because it'll contain multiple different columns of interest, as well as the data types that it holds.

I did go ahead an create a hack-y function for my own use, however, so this request can be considered addressed. This is the output it provides (colours to differentiate data types, not to identify them and truncating very long column names so that data can be seen on the same line), which I find particularly useful for very wide tables. I hope this clears up my use case - it is something that can be implemented without many additional dependencies (currently using crayon and stringi because I wanted to avoid the slight extra effort).

fabeit commented 3 years ago

I completely agree that for tables with lots of columns with long names the print of dt is really cumbersome. None of the options are really useful, and I find the print from tibble a very nice compromise.

@avimallu wow that's a really nice way to visualize a data.table. Would you mind sharing the function?

Came here to say ask why datatable.prettyprint.char option is not listed in the help page of print.data.table?

avimallu commented 3 years ago

@fabeit, you can find it on my Github.

avimallu commented 3 years ago

Also, @MichaelChirico, 11th item in this is already done in #4074, right? One more (minor) update to the code that caters to that (if relevant):

require(data.table)
dt = setDT(lapply(1:100, function(x) 1:3))
dt
tibble::tbl_dt(dt)
fabeit commented 3 years ago

@avimallu beautiful, thanks! Is there a way to print row and column count at the bottom as well as the top?

MichaelChirico commented 3 years ago

Thanks @avimallu indeed that point's done, I've marked it now

avimallu commented 3 years ago

@fabeit you can edit the source code (or contribute yourself) to get that to show. While I am flattered with your interest in the function, it may be best to limit discussion on it in this thread as it is off-topic.