Cracking-the-Coding-Interview | Solution and analysis of the interview classics | Learning library
kandi X-RAY | Cracking-the-Coding-Interview Summary
kandi X-RAY | Cracking-the-Coding-Interview Summary
Solution and analysis of the interview classics: "Cracking the Coding Interview". 2013.11.11 03:47. Zhu Li, Software Development Engineer at Baidu, Inc.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Cracking-the-Coding-Interview
Cracking-the-Coding-Interview Key Features
Cracking-the-Coding-Interview Examples and Code Snippets
Community Discussions
Trending Discussions on Cracking-the-Coding-Interview
QUESTION
I am pretty new to working with jupyter notebook. I overall like it, although I sometimes get some weird errors that sometimes appear and then sometimes do not. For example, I have a data set that looks like this (showing the .head()):
Now, if I set say volume = data["avg_volume"], and then say volume.head() I get this:
But lets say I delete that line and put it somewhere else, I sometimes will get this error:
...ANSWER
Answered 2018-Sep-17 at 18:19In your code for data in pnl
, you redefined the variable data
, so it is no longer a DataFrame
and cannot by indexed by a colum name.
And BTW, many bugs like this can be found out when you are trying to produce a minimal, complete, verifiable example. You'll notice that when you remove the for
loop this bug is gone.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Cracking-the-Coding-Interview
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page