Python for Data Science for Dummies Errata on Page 221

The downloadable source for Python for Data Science for Dummies contains a problem that doesn’t actually appear in the book. If you look at page 221, the code block in the middle of the page contains a line saying import numpy as np. This line is essential because the code won’t run without it. The downloadable source for Chapter 12 is missing this line so the example doesn’t run. This P4DS4D; 12; Stretching Pythons Capabilities link provides you with a .ZIP file that contains the replacement source code. Simple remove the P4DS4D; 12; Stretching Pythons Capabilities.ipynb file from the archive and use it in place of your existing file.

Luca and I always want you to have a great experience with our book, so keep those emails coming. Please let me know if you have any questions about source code file update at John@JohnMuellerBooks.com. I’m sorry about any errors that appear in the downloadable source and appreciate the readers who have pointed them out.

 

Python for Data Science for Dummies Errata on Page 145

Python for Data Science for Dummies contains two errors on page 145. The first error appears in the second paragraph on that page. You can safely disregard the sentence that reads, “The use_idf controls the use of inverse-document-frequency reweighting, which is turned off in this case.” The code doesn’t contain a reference to the use_idf parameter. However, you can read about it on the Scikit-Learn site. This parameter defaults to being turned on, which is how it’s used for the example.

The second error is also in the second paragraph. The discussion references the tf_transformer.transform() method call. The actual method call is tfidf.transform(), which does appear in the sample code. The discussion about how the method works is correct, just the name of the object is wrong.

Please let me know if you have any questions about either of these changes at John@JohnMuellerBooks.com. I’m sorry about any errors that appear in the book and appreciate the readers who have pointed them out.

 

Python for Data Science for Dummies Errata on Page 124

Python for Data Science for Dummies contains an error in the example that appears on the top half of page 124. In the first of the two grey boxes, the code computes the results of four print statements. The bottom-most print statement, print x[1:2, 1:2], is supposed to compute a result based on rows 1 and 2 of columns 1 and 2, and the bottom grey box seems to confirm that interpretation by the showing the result as [[[14 15 16] [17 18 19]] [[24 25 26] [27 28 29]]]. However, the answer provided for this example in the downloadable source code is [[[14 15 16]]], which doesn’t agree with that in the text.

The good news is that the downloadable source contains the correct code. The error appears only in the book. The last print statement in the book is wrong. Here is the correct code (with output) for this example:

x = np.array([[[1, 2, 3], [4, 5, 6], [7, 8, 9],],
 [[11,12,13], [14,15,16], [17,18,19],],
 [[21,22,23], [24,25,26], [27,28,29]]])

print x[1,1]
print x[:,1,1]
print x[1,:,1]
print
print x[1:3, 1:3]
[14 15 16]
[ 5 15 25]
[12 15 18]

[[[14 15 16]
 [17 18 19]]

[[24 25 26]
 [27 28 29]]]

Please let me know if you have any questions about this example at John@JohnMuellerBooks.com. I’m sorry about the error that appears in the book and appreciate the readers who have pointed it out.

 

Tip Error in Python for Data Science for Dummies

There is a small error on page 318 of Python for Data Science for Dummies. You can find it near the middle of the page in the Tip text. The current text on the second line of that paragraph says, “k as a number near the squared number of available observations.” However, the text should really read, “k as a number near the squared root number of available observations.” The word root is missing, which obviously changes the mathematical meaning of the text. Please accept our apologies for the typo. Let me know if you find any other errors of a technical nature in the book at John@JohnMuellerBooks.com and I’ll be sure to provide a blog post about it here. Thank you for your support!

 

C++ All-in-One for Dummies, 3rd Edition, Error

It seems to be my week for reporting errors! Just yesterday I reported one in Beginning Programming with Python For Dummies. Today I’m reporting an error in C++ All-In-One for Dummies, 3rd Edition. If you look in Book I Chapter 3 on page 67, you see Listing 3-6. The listing title tells you that this example uses brackets to access an individual character in a string, which is precisely what it does. However, what the example is supposed to do is show you how to create the string in the first place. Look at Listing 3-7 on page 68 and you see an example that performs this task. The two listings are switched. As you go through the book, please use Listing 3-7 first and Listing 3-6 second. I’m sorry about any confusion caused by the error. Please contact me at John@JohnMuellerBooks.com if you have any questions about this or any other error in the book. I’ll be only too happy to help.

 

Beginning Python for Dummies Chapter 13 Error

Even with the most carefully crafted book, errors do creep in (see Errors in Writing). There is an error in Chapter 13 of Beginning Programming with Python For Dummies on page 247. In Step 8 you are supposed to, “Type MyTuple[4] and press Enter.” The output information for that step is wrong. Instead of seeing Orange, as specified in the book, you see Yellow. The value Yellow was added to the tuple in Step 7 as the fifth value, which you access using MyTuple[4]. I’m sincerely sorry about any problems that the error may have caused in using the book. Please let me know if you have any questions about this issue at John@JohnMuellerBooks.com.

 

Finding the Source Code for Microsoft ADO.NET Entity Framework Step by Step

Sometimes a bit of information isn’t known by an author at the time of writing, so the book will contain placeholder text to remind everyone to add the information later. Normally, the process works great and the replacement is made without problem. I was recently informed of a problem in Microsoft ADO.NET Entity Framework Step by Step. It turns out that there is placeholder text in some places that reads, “Provide URL Here.” I added the placeholder because I didn’t know where the publisher would store the book’s source code at the time of writing. Of course, the placeholder is hardly helpful to anyone who really would like to find the book’s source.

If you encounter such a placeholder in this book, please go to the O’Reilly download site at http://aka.ms/ADONETEFSbS/files or http://examples.oreilly.com/9780735664166-files/ to obtain the files. I really do consider it important that you download the book’s source code and use it as you work through the text. This particular book has a lot of complex examples that will be tough to get right if you type them in by hand. A single typo can make the examples completely unusable, or at least cause damage to your sample database.

In addition to reading about potential problems and obtaining useful bits of additional information by reading my blog, make sure you also check the book’s errata page at http://www.oreilly.com/catalog/errata.csp?isbn=0790145339164 (see my Errors in Writing post as well). This page provides you with succinct summaries of potential problems and the fixes I suggest for them. Always feel free to write me about my books as well at John@JohnMuellerBooks.com. It’s important to me that you always have a great experience when using my books.

 

Finding the Errata for Microsoft ADO.NET Entity Framework Step by Step

I’ve written about the potential for errors in books before as part of my Errors in Writing post. One of the reasons I have created this blog is to help you through some of the worst errors that make it into my books (despite the best efforts of myself, other professionals, and the hard working beta readers). Now that Microsoft ADO.NET Entity Framework Step by Step has been released, a few readers have noted a couple of glitches.

One of the most noticeable errors appears on page 384. Look at Steps 6 and 9. The graphics after the two steps have been swapped. The image shown after step 6 should actually appear after step 9. Likewise, the image shown after step 9 should actually appear after step 6. Generally, graphic mix-ups like this don’t occur, but they do sometimes and they always prove confusing for the reader. It’s one of those situations where the mix-up escaped everyone’s notice during the proofreading process and I’m sorry about any confusion the error might have caused as you start working through the procedures in this chapter. You can see more errors and additional information for this book in the Entity Framework Development Step-by-Step category of this blog.

There are also a couple of other minor errors that have been found by readers and uploaded to the errata page for this book on the O’Reilly site. The table shows the location of the error and the resolution you should use when working through that error. Generally speaking, if you see an entry in the table, it probably affects all versions of the book, not just the single version in which the error was originally found.

You should also go to the general page for this book to gain access to other publisher-supported resources for it. For example, the general page contains links for the companion content for the book, as well as a means to register your book purchase with O’Reilly.

I always want you to have a great experience using my books. Errors tend to make that experience less than stellar, but mistakes do happen and the best I can do is to tell you how to correct them once they’re found. If you ever find an error in this, or any other of my books, please be sure to write me at John@JohnMuellerBooks.com. Thank you for continuing to support my writing efforts. I greatly appreciate your help.