Timeline for Discouraging questioners from posting data in table form for questions on R/SQL
Current License: CC BY-SA 4.0
48 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 4, 2021 at 12:40 | history | edited | user438383 | CC BY-SA 4.0 |
Adding in helpful function noted in the comments
|
Apr 6, 2021 at 13:37 | comment | added | Shepmaster | Related: Could we add a tag-specific MRE page? | |
Apr 6, 2021 at 12:52 | comment | added | Holger | @Larnu yes, I understood your comment (now). My previous comment was just trying to explain why I didn’t understand immediately. The fault was my narrow focus. | |
Apr 6, 2021 at 12:49 | comment | added | Thom A |
Yes, DDL and DML is far better than tabular text , @Holger , but again, I never said it wasn't. What I did state, however, is that tabular text data is also better than a markdown table for sample data. Tabular text can be fairly easily converted to a VALUES clause, for example, with some strong typing. This takes a bit more effort with tab delimited data, in my opinion. If every user supplied DDL and DML, I wouldn't have even made the comment; but far too many users still post images of Excel Spreadsheets instead... 😠 They are far from useful most of the time.
|
|
Apr 6, 2021 at 12:47 | comment | added | Holger | @Larnu ok, I was too much focused on the idea that people should post the DDL/DML statements in the first place. For me, as a Java answerer, neither text format is helpful, but I suppose, for SQL questions, it might also sometimes be important to know the actual column declarations, instead of having to guess them from a text dump of whatever form… | |
Apr 6, 2021 at 12:43 | comment | added | Thom A |
I state ". A fixed width tabular text table, however, is far easier to deal with." in my comment, @Holger . Apologies, but I'm not sure what about that isn't clear?
|
|
Apr 6, 2021 at 12:42 | comment | added | Holger | @Larnu the statement wasn’t that clear. So, it wasn’t better before the introduction of the markdown tables anyway? | |
Apr 6, 2021 at 12:39 | comment | added | Thom A | I never said it was caused by the markdown tables, @Holger ? I just said that the markdown tables don't help turn data posted into DML and DDL statements. | |
Apr 6, 2021 at 12:38 | comment | added | Holger | @Larnu but that’s not caused by the markdown support for tables. There are tons of poor Java questions containing not a single line of Java code, but a JSON style dump (which has no syntactic support in markdown). People will write bad questions, with syntax support or without. | |
Apr 6, 2021 at 12:32 | answer | added | iacob | timeline score: 1 | |
Apr 6, 2021 at 8:51 | answer | added | Konrad Rudolph | timeline score: 8 | |
Apr 6, 2021 at 8:44 | comment | added | Konrad Rudolph | @stevec Actually it’s trivial to import HTML tables into R. | |
Apr 6, 2021 at 6:19 | answer | added | FooBar | timeline score: 9 | |
Apr 6, 2021 at 3:12 | comment | added | semblable | This applies 100% to Pandas, too. I see it constantly, and almost exclusively from new users. | |
Apr 5, 2021 at 21:34 | comment | added | Elin | I don't want to read the clipboard, I want to copy the whole thing and paste it in my console or a script file. | |
Apr 5, 2021 at 20:04 | comment | added | ALollz |
Does R not have a read_clipboard function similar to the functionality of pandas.read_clipboard (which works fine with those tables)? Looks like datapasta would achieve that. Still doesn't fully fix the problem of dtypes, but for those examples the sample table could be accompanied by code like in: stackoverflow.com/questions/5963269/…, that way you get the best of both worlds -- a table that clearly visualizes the problem for people seeking help and data to assist answerers in solving the problem.
|
|
Apr 5, 2021 at 17:43 | history | edited | user438383 | CC BY-SA 4.0 |
add quote and clarify
|
Apr 5, 2021 at 17:38 | history | edited | user438383 | CC BY-SA 4.0 |
add quote and clarify
|
Apr 5, 2021 at 15:18 | history | edited | Braiam |
edited tags
|
|
Apr 5, 2021 at 14:55 | history | edited | CatijaStaffMod |
edited tags
|
|
Apr 5, 2021 at 14:55 | history | edited | Braiam |
More science? MOAR SCIENCE!
|
|
Apr 5, 2021 at 13:57 | comment | added | Kit | If we have to discourage the most natural form of representing tabular data (a table) then the feature's a bug! | |
Apr 5, 2021 at 12:20 | answer | added | klutt | timeline score: -4 | |
Apr 5, 2021 at 11:36 | comment | added | jay.sf | Related: meta.stackoverflow.com/q/404125/6574038 | |
Apr 5, 2021 at 10:51 | comment | added | Charlieface | @MartinSmith Multi-row inserts are unnecessary, it's only going to be a few rows anyway. And as I said, we need multiple different options, and a flip-out menu can have as much as you want. | |
Apr 5, 2021 at 10:46 | answer | added | MT0 | timeline score: 8 | |
Apr 5, 2021 at 10:35 | comment | added | Martin Smith | @Charlie "SQL" would probably require multiple flavours. To get multirow insert statements compatible with Oracle and SQL Server for example. | |
Apr 5, 2021 at 10:00 | answer | added | Flimm | timeline score: 0 | |
Apr 5, 2021 at 9:50 | comment | added | Charlieface | Surely the real solution here is to have a flip-out button on the table allowing clipboard copying in various formats. The obvious ones being SQL, R and CSV, but perhaps there are others also | |
Apr 5, 2021 at 9:31 | answer | added | mickmackusa | timeline score: 13 | |
Apr 5, 2021 at 8:18 | comment | added | Martin Smith | It's a while since I have done much answering but I think I remember correctly that the markdown tables paste OK into the "text to DDL" box on SQL Fiddle and so allow them to be converted to DDL that way. | |
Apr 5, 2021 at 5:14 | comment | added | Chris Schaller | @stevec I can't comment on R, but for since SQL was brought in it highlights a similar issue, having the data in a table still requires parsing work, you can rarely use it directly, but the table now provides a standard, the underlying syntax can vary a lot, but the formatted output is consistent, meaning once you have learned to use it, it saves a lot of time. It would be awesome if users posted questions with full DDL and DML scripts, but often a the questions asked indicate a level of knowledge that precludes OP from being able to provide this level of detail in the first place. | |
Apr 5, 2021 at 5:06 | comment | added | stevec | @ChrisSchaller in R it's kinda annoying because to replicate the issue, you have to somehow provide that exact data.frame to R, which typically means manually typing out that object (e.g. placing double quotes around strings, commas between values, instantiating the object) and even then you're kinda left guessing as to the class of the object - for example, in the OP's example question, it could be a tibble or a data.frame (or something else), but we're never really sure. | |
Apr 5, 2021 at 4:53 | comment | added | Chris Schaller | I find that data posted as formatted tables is superior because it enhances the ability to cut and paste into consoles and tool like SSMS and excel, so for SQL I disagree with this post and I want to encourage more users to use formatted tables. It is a deliberate and consitant standard, instead of all the other variants in code blocks. The key for me is that the tables cut'n'paste as tab delimited which is very versatile and even translates well into scripts and consoles. | |
Apr 5, 2021 at 4:01 | answer | added | StingyJack | timeline score: 5 | |
Apr 4, 2021 at 21:38 | comment | added | DavidG | I made a userscript to show a button when you hover over tables that lets you copy the table to a CSV format. It works great for me. Only reason I didn't publish it is because I'm a pretty average front-end dev, but if anyone wants to take it and make it better... gist.github.com/WiredUK/26bc458f7ec2d17ae5be8e03ce0c1011 | |
Apr 4, 2021 at 19:53 | comment | added | trincot | I don't really see a problem with markdown tables in SQL questions. If you copy/paste the table to a text editor, the columns are separated by tabs, which seems just as easy to replace as replacing a pipe symbol. Of course, it would be better if such questions would include DDL and DML scripts. But if the comparison is with pipe separated code-formatted tables, then I don't really see a difference in effort to turn it into a script. | |
Apr 4, 2021 at 19:13 | history | became hot meta post | |||
Apr 4, 2021 at 18:27 | history | edited | Braiam |
edited tags
|
|
Apr 4, 2021 at 7:22 | comment | added | BSMP | @Larnu That might be worth pointing out in the editing FAQ as well. I can see someone posting a SQL question with their data in that format only to have someone edit it into the new markdown. | |
Apr 3, 2021 at 19:00 | history | edited | user438383 | CC BY-SA 4.0 |
update title
|
Apr 3, 2021 at 18:49 | history | edited | user438383 | CC BY-SA 4.0 |
added 80 characters in body
|
Apr 3, 2021 at 18:42 | comment | added | philipxy | meta.stackexchange.com/a/357335/266284 | |
Apr 3, 2021 at 14:48 | comment | added | Thom A |
I, personally, don't think this just applies to R. The new tables are awful for SQL based questions too, as converting them to DML statements requires a lot of effort. A fixed width tabular text table, however, is far easier to deal with. The new table markdown is "nice" but it's not always useful unfortunately; sometimes to opposite.
|
|
Apr 3, 2021 at 14:08 | history | edited | user438383 | CC BY-SA 4.0 |
deleted 6 characters in body
|
Apr 3, 2021 at 14:08 | history | edited | user438383 | CC BY-SA 4.0 |
deleted 6 characters in body
|
Apr 3, 2021 at 14:08 | comment | added | Tom | You could write a "canned comment", like Peter did in that linked question, telling users how to properly provide the example data. | |
Apr 3, 2021 at 13:57 | history | asked | user438383 | CC BY-SA 4.0 |