shaildeliwala / experiments Goto Github PK
View Code? Open in Web Editor NEWCode and notebooks containing my experiments in data science, EDA, visualization, and machine learning
License: Apache License 2.0
Code and notebooks containing my experiments in data science, EDA, visualization, and machine learning
License: Apache License 2.0
The first time I executed your code I got a strange error:
Traceback (most recent call last):
File "streamlit.py", line 2, in <module>
import streamlit as st
File "C:\Users\emamorc\Google Drive\AIML\Projects\streamlit.py", line 5, in <module>
@st.cache
AttributeError: partially initialized module 'streamlit' has no attribute 'cache' (most likely due to a circular import)
After some research I realized that the problem was the file name! changing the name from streamlit.py to demosl.py the error disappears.
Hi Shail,
I tried to follow your review on Medium, when I run your code on my machine I got the above error:
here is the full error, and the error is not due to reading from the web address, as that function reads the csv:
I am not sure what more I should provide as this is the first time ever I am raising an issue.
`Traceback (most recent call last):
File "", line 1, in
runfile('C:/Users/aedal/OneDrive/Desktop/del.py', wdir='C:/Users/aedal/OneDrive/Desktop')
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
execfile(filename, namespace)
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/aedal/OneDrive/Desktop/del.py", line 53, in
top_host_1 = df.query('[email protected][0]')
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\frame.py", line 3184, in query
res = self.eval(expr, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\frame.py", line 3300, in eval
return _eval(expr, inplace=inplace, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\computation\eval.py", line 322, in eval
parsed_expr = Expr(expr, engine=engine, parser=parser, env=env, truediv=truediv)
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\computation\expr.py", line 827, in init
self.terms = self.parse()
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\computation\expr.py", line 844, in parse
return self._visitor.visit(self.expr)
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\computation\expr.py", line 441, in visit
return visitor(node, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\computation\expr.py", line 447, in visit_Module
return self.visit(expr, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\computation\expr.py", line 441, in visit
return visitor(node, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\computation\expr.py", line 450, in visit_Expr
return self.visit(node.value, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\computation\expr.py", line 441, in visit
return visitor(node, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\computation\expr.py", line 744, in visit_Compare
return self.visit(binop)
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\computation\expr.py", line 441, in visit
return visitor(node, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\computation\expr.py", line 563, in visit_BinOp
op, op_class, left, right = self._maybe_transform_eq_ne(node)
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\computation\expr.py", line 484, in _maybe_transform_eq_ne
right = self.visit(node.right, side="right")
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\computation\expr.py", line 441, in visit
return visitor(node, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\computation\expr.py", line 603, in visit_Subscript
slobj, local_dict=self.env, engine=self.engine, parser=self.parser
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\computation\eval.py", line 319, in eval
target=target,
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\computation\scope.py", line 31, in _ensure_scope
target=target,
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\computation\scope.py", line 124, in init
self.update(local_dict.level)
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\computation\scope.py", line 261, in update
stack = inspect.stack()
File "C:\ProgramData\Anaconda3\lib\inspect.py", line 1513, in stack
return getouterframes(sys._getframe(1), context)
File "C:\ProgramData\Anaconda3\lib\inspect.py", line 1490, in getouterframes
frameinfo = (frame,) + getframeinfo(frame, context)
File "C:\ProgramData\Anaconda3\lib\inspect.py", line 1464, in getframeinfo
lines, lnum = findsource(frame)
File "C:\ProgramData\Anaconda3\lib\inspect.py", line 828, in findsource
if pat.match(lines[lnum]): break
IndexError: list index out of range`
Thanks,
Amin
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.