Forum Replies Created

Viewing 15 posts - 46 through 60 (of 332 total)

  • Reply To: Capitalize the name

    kaspencer wrote:

    How about:

    name.title();

    Wouldn't that work for this one-word example?

    # Python v2.7.13 code:

    str = "this is string example.";

    print str

    print "str.capitalize() : ", str.capitalize()

    print "str.title() : ", str.title()

    $python main.py

    #...

    • This reply was modified 6 years, 1 months ago by George Vobr.
  • Reply To: Execution Plan Types

    Scary but interesting question, thanks Grant. At first I thought that all possible answers could be considered correct. After a moment of despair, I found a hint for the right...

  • Reply To: Assignment of a value to a variable

    Great question, thanks John. Some typo doesn't matter, and the same two answers don't. After all, one correct answer rules out the remaining... Thanks also to Carlo Romagnano for clarifying...

  • Reply To: Read Only Files

    Ref. in the QotD explanation refers to the documentation for Built-in Functions and the open() function not to Input and Output. In...

    • This reply was modified 6 years, 2 months ago by George Vobr.
    • This reply was modified 6 years, 2 months ago by George Vobr.
  • Reply To: Python Map

    Hmmm ... oddly, print (result) in Python v2.7.13 displays the result correctly. No need to add list().

  • Reply To: Preparing Encryption with Trace Flags

    Thanks Steve, for an interesting question. I appreciate the perfect explanation of this topic in a recent article in your "Voice of the DBA" blog. Well done!

  • Reply To: Renaming Columns

    In Python Pandas (Python v2.7.13), option #1 works with both { } and [ ].

    In addition, option #3 without the Inplace=True parameter will do nothing and the original df will...

    • This reply was modified 6 years, 4 months ago by George Vobr.
    • This reply was modified 6 years, 4 months ago by George Vobr.
    • This reply was modified 6 years, 4 months ago by George Vobr.
  • Reply To: Renaming Columns

    Rune Bivrin wrote:

    I thought I wouldn't touch this question until it's been reviewed, but I couldn't resist.

    Clearly, option 3 wouldn't work, since the original column name is "BillingAmount", and not "BillAmount"....

  • Reply To: Updating Statistics

    Thanks for this question, Steve. Let me add a link to an interesting article: Does rebuild index update statistics?

  • Reply To: Sorting the Data Frame

    steve the dba wrote:

    Would the following also work?

    > passing.2019[order(-TD.2019,]

    Good catch. Yes, > passing.2019[order(-TD.2019),] works like > passing.2019[order(TD.2019, decreasing = TRUE),]. But your code: > passing.2019[order(-TD.2019,] gives a syntax error....

  • Reply To: Finding Free Space

    Today I will not answer, I tried to calculate the free space only from sys.database_files as Free_space = max_size - size,

    but it is necessary to treat the value max_size -1...

  • Reply To: Backing up SSAS Databases

    Great question, thanks Steve. In fact, it's a good reminder that striping a backup of SQL Server relational database can significantly reduce the time it takes for this backup to...

    • This reply was modified 6 years, 6 months ago by George Vobr.
  • Reply To: Combining Numpy Arrays

    Thanks Steve for this interesting question. I'm surprised how cute Python is, he doesn't mind square brackets in the right answer ... 🙂

  • Reply To: Minimalistic SELECT

    Ah..., my apologies, it is obvious that in the expression '1.77 + 0. test' is the second dot also an decimal point. I had to be blind. I have overlooked...

  • Reply To: Minimalistic SELECT

    Hi Carlo, yes you're right. The first dot in constant numeric number in the selected

    expression is the decimal point. The second dot is a "virtual AS".

    SELECT 1.77+0....

Viewing 15 posts - 46 through 60 (of 332 total)