This document discusses using IPython Notebook and pandas to analyze and visualize data from a PostgreSQL database. It shows how to:
1. Connect to a PostgreSQL database and query data using pandas.read_sql()
2. Load the data into a DataFrame and explore the columns
3. Plot time series and other data visualizations of the DataFrame
4. Join data from multiple database tables and plot the results
발표자: 김준호(Lunit)
발표일: 2018.1.
의료 AI 관련 중, nodule detection 문제에 대해 다뤄보고자 합니다.
의료 AI에서는 어떠한 방식으로 classication을 하고, preprocessing은 어떤식으로 진행되는지 LUNA16이라는 의료 challenge에 이용되는 데이터를 가지고 발표를 진행해보고자 합니다.
이후, 이 데이터를 이용해서 최근 2017 MICCAI (의료 영상학회에서는 높은 수준의 학회)에서 발표된 "curriculum adaptive sampling for extreme data imbalance"를 실제 구현해서 적용해보고 이 때 발생할 수 있는 문제를 어떤식으로 해결할 수 있는지에 대한 tip도 제공할 예정입니다. (Python multi-processing data load, input-pipeline)
위 논문을 선정한 이유는, 단순한 classification이 아닌, nodule이 있는 위치도 정확하게 catch하는 논문 중, performance가 상당히 높기 때문입니다.
Wrangle 2016: (Lightning Talk) FizzBuzz in TensorFlowWrangleConf
By Joel Grus, AI2
FizzBuzz is a ubiquitous, nearly trivial problem used to weed out developer job applicants. Recently, Joel wrote a joking-not-joking blog post about a fictional interviewee who solves it using neural networks. After the blog post went viral, he spent a lot of time thinking about FizzBuzz as a machine-learning problem. It turns out, it's surprisingly interesting and subtle! Here, Joel talks about how and why.
발표자: 김준호(Lunit)
발표일: 2018.1.
의료 AI 관련 중, nodule detection 문제에 대해 다뤄보고자 합니다.
의료 AI에서는 어떠한 방식으로 classication을 하고, preprocessing은 어떤식으로 진행되는지 LUNA16이라는 의료 challenge에 이용되는 데이터를 가지고 발표를 진행해보고자 합니다.
이후, 이 데이터를 이용해서 최근 2017 MICCAI (의료 영상학회에서는 높은 수준의 학회)에서 발표된 "curriculum adaptive sampling for extreme data imbalance"를 실제 구현해서 적용해보고 이 때 발생할 수 있는 문제를 어떤식으로 해결할 수 있는지에 대한 tip도 제공할 예정입니다. (Python multi-processing data load, input-pipeline)
위 논문을 선정한 이유는, 단순한 classification이 아닌, nodule이 있는 위치도 정확하게 catch하는 논문 중, performance가 상당히 높기 때문입니다.
Wrangle 2016: (Lightning Talk) FizzBuzz in TensorFlowWrangleConf
By Joel Grus, AI2
FizzBuzz is a ubiquitous, nearly trivial problem used to weed out developer job applicants. Recently, Joel wrote a joking-not-joking blog post about a fictional interviewee who solves it using neural networks. After the blog post went viral, he spent a lot of time thinking about FizzBuzz as a machine-learning problem. It turns out, it's surprisingly interesting and subtle! Here, Joel talks about how and why.
Scala 3 is arriving, and with it comes incredible new power for library authors. In this presentation, Alexander Ioffe, contributor to Quill (a LINQ-like persistence layer for Scala), will show how using Scala 3 Macros, Quill is being rebuilt to be better, stronger, and faster. As you will learn in this presentation, Scala 3 introduces a new powerhouse keyword called 'inline' that opens up a new continent of capability. This construct powers all Scala 3 macros, and allows users to interact with staged code almost indistinguishably from normal code, allowing familiar patterns such as global-methods, type-classes, and type-level-logic. For Quill, Alexander will show how this allows generating compile-time SQL using patterns that we once only dreamed about using--and these features just scratch the surface of what can be done with staged code. Come discover the bright future of powerful, type-safe libraries in Scala 3!
Машинное обучение на JS. С чего начать и куда идти | Odessa Frontend Meetup #12OdessaFrontend
В последние годы машинное обучаение получило широчайшее распространение во всех областях деятельности человека. каждая кофеварка и пылесос, не говоря уже о web приложениях, стараются сделать нашу жизнь чуточку лучше прибегая к использованию искусственного интеллекта. нужно ли получать научную степень для того чтобы попробовать себя в этом нелегком деле и может ли простой front-end разработчик применить у себя в родном фреймворке нейронку? Влад Борш рассказывает об этом и пытается разобраться откуда стартовать.
CONFidence 2015: DTrace + OSX = Fun - Andrzej Dyjak PROIDEA
Speaker: Andrzej Dyjak
Language: English
In recent years security industry started to grow fond of Apple’s iOS and OS X platforms. This talk will cover one of XNU's flagship debugging utilities: DTrace, a dynamic tracing framework for troubleshooting kernel and application problems on production systems in real time. It will be shown how it can be used in order to ease various tasks within the realm of dynamic binary analysis and beyond.
CONFidence: http://confidence.org.pl/
Beyond PHP - It's not (just) about the codeWim Godden
Most PHP developers focus on writing code. But creating Web applications is about much more than just wrting PHP. Take a step outside the PHP cocoon and into the big PHP ecosphere to find out how small code changes can make a world of difference on servers and network. This talk is an eye-opener for developers who spend over 80% of their time coding, debugging and testing.
Scala 3 is arriving, and with it comes incredible new power for library authors. In this presentation, Alexander Ioffe, contributor to Quill (a LINQ-like persistence layer for Scala), will show how using Scala 3 Macros, Quill is being rebuilt to be better, stronger, and faster. As you will learn in this presentation, Scala 3 introduces a new powerhouse keyword called 'inline' that opens up a new continent of capability. This construct powers all Scala 3 macros, and allows users to interact with staged code almost indistinguishably from normal code, allowing familiar patterns such as global-methods, type-classes, and type-level-logic. For Quill, Alexander will show how this allows generating compile-time SQL using patterns that we once only dreamed about using--and these features just scratch the surface of what can be done with staged code. Come discover the bright future of powerful, type-safe libraries in Scala 3!
Машинное обучение на JS. С чего начать и куда идти | Odessa Frontend Meetup #12OdessaFrontend
В последние годы машинное обучаение получило широчайшее распространение во всех областях деятельности человека. каждая кофеварка и пылесос, не говоря уже о web приложениях, стараются сделать нашу жизнь чуточку лучше прибегая к использованию искусственного интеллекта. нужно ли получать научную степень для того чтобы попробовать себя в этом нелегком деле и может ли простой front-end разработчик применить у себя в родном фреймворке нейронку? Влад Борш рассказывает об этом и пытается разобраться откуда стартовать.
CONFidence 2015: DTrace + OSX = Fun - Andrzej Dyjak PROIDEA
Speaker: Andrzej Dyjak
Language: English
In recent years security industry started to grow fond of Apple’s iOS and OS X platforms. This talk will cover one of XNU's flagship debugging utilities: DTrace, a dynamic tracing framework for troubleshooting kernel and application problems on production systems in real time. It will be shown how it can be used in order to ease various tasks within the realm of dynamic binary analysis and beyond.
CONFidence: http://confidence.org.pl/
Beyond PHP - It's not (just) about the codeWim Godden
Most PHP developers focus on writing code. But creating Web applications is about much more than just wrting PHP. Take a step outside the PHP cocoon and into the big PHP ecosphere to find out how small code changes can make a world of difference on servers and network. This talk is an eye-opener for developers who spend over 80% of their time coding, debugging and testing.
Beyond php - it's not (just) about the codeWim Godden
Most PHP developers focus on writing code. But creating Web applications is about much more than just wrting PHP. Take a step outside the PHP cocoon and into the big PHP ecosphere to find out how small code changes can make a world of difference on servers and network. This talk is an eye-opener for developers who spend over 80% of their time coding, debugging and testing.
Business Dashboards using Bonobo ETL, Grafana and Apache AirflowRomain Dorgueil
Zero-to-one hands-on introduction to building a business dashboard using Bonobo ETL, Apache Airflow, and a bit of Grafana (because graphs are cool). The talk is based on the early version of our tools to visualize apercite.fr website. Plan, Implementation, Visualization, Monitoring and Iterate from there.
Wszyscy zostaliśmy oszukani! Automatyczne zarządzanie pamięci rozwiąże wszystkie Wasze problemy, mówili. W zarządzanych środowiskach takich jak CLR JVM nie będzie wycieków pamięci, mówili! Właściwie pamięć jest tania i nie musisz się już nią nigdy więcej martwić. Wszyscy kłamali. Automatyczne zarządzanie pamięcią jest wygodną abstrakcją i bardzo często działa dobrze. Ale jak każda abstrakcja, wcześniej czy później "wycieka" ona. I to najczęściej w najmniej spodziewanym i przyjemnym momencie. W tej sesji spróbuję otworzyć oczy na fakt, że błoga nieświadomość nt. tej abstrakcji może być kosztowna. Pokażę jak może się objawić frywolne traktowanie pamięci i co możemy zyskać pisząc kod zdając sobie sprawę, że pamięć jednak nie jest nieskończona, tania i zawsze jednakowo szybka.
DSD-INT 2018 Work with iMOD MODFLOW models in Python - Visser BootsmaDeltares
Presentation by Martijn Visser and Huite Bootsma (Deltares) at the iMOD International User Day 2018, during Delft Software Days - Edition 2018. Tuesday 13 November 2018, Delft.
Beyond php - it's not (just) about the codeWim Godden
Most PHP developers focus on writing code. But creating Web applications is about much more than just wrting PHP. Take a step outside the PHP cocoon and into the big PHP ecosphere to find out how small code changes can make a world of difference on servers and network. This talk is an eye-opener for developers who spend over 80% of their time coding, debugging and testing.
https://www.dmdiploma.com/studymaterial?id=5/python-for-data-science
This Python course provides a beginner-friendly introduction to Python for Data Science.
End-to-end Big Data Projects with Python - StampedeCon Big Data Conference 2017StampedeCon
This talk will go over how to build an end-to-end data processing system in Python, from data ingest, to data analytics, to machine learning, to user presentation. Developments in old and new tools have made this particularly possible today. The talk in particular will talk about Airflow for process workflows, PySpark for data processing, Python data science libraries for machine learning and advanced analytics, and building agile microservices in Python.
System architects, software engineers, data scientists, and business leaders can all benefit from attending the talk. They should learn how to build more agile data processing systems and take away some ideas on how their data systems could be simpler and more powerful.
Beyond php - it's not (just) about the codeWim Godden
Most PHP developers focus on writing code. But creating Web applications is about much more than just wrting PHP. Take a step outside the PHP cocoon and into the big PHP ecosphere to find out how small code changes can make a world of difference on servers and network. This talk is an eye-opener for developers who spend over 80% of their time coding, debugging and testing.
Beyond php - it's not (just) about the codeWim Godden
Most PHP developers focus on writing code. But creating Web applications is about much more than just wrting PHP. Take a step outside the PHP cocoon and into the big PHP ecosphere to find out how small code changes can make a world of difference on servers and network. This talk is an eye-opener for developers who spend over 80% of their time coding, debugging and testing.
Best Data Science Ppt using Python
Data science is an inter-disciplinary field that uses scientific methods, processes, algorithms and systems to extract knowledge and insights from many structural and unstructured data. Data science is related to data mining, machine learning and big data.
Beyond PHP - it's not (just) about the codeWim Godden
Most PHP developers focus on writing code. But creating Web applications is about much more than just writing PHP. Take a step outside the PHP cocoon and into the big PHP ecosphere to find out how small code changes can make a world of difference on servers and network. This talk is an eye-opener for developers who spend over 80% of their time coding, debugging and testing.
Python's "batteries included" philosophy means that it comes with an astonishing amount of great stuff. On top of that, there's a vibrant world of third-party libraries that help make Python even more wonderful. We'll go on a breezy, example-filled tour through some of my favorites, from treasures in the standard library to great third-party packages that I don't think I could live without, and we'll touch on some of the fuzzier aspects of the Python culture that make it such a joy to be part of.
網頁爬蟲入門 Python web crawler at 淡江大學 20170930Tim Hong
Python crawler, web spider by python
In this tutorial, we will learn how to use basic python language to write a sample script, and 2 sample crawler by using library like "Requests","Beautiful soup" and pandas
淡江大學 基礎爬蟲課程
This slide is DSP Company Profile,http://dsp.im/
DSP is a data consulting company locate in Taipei,
Our mission:
Data literacy for all.
Data Empowerment for all.
http://dsp.im/
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
How to Get CNIC Information System with Paksim Ga.pptxdanishmna97
Pakdata Cf is a groundbreaking system designed to streamline and facilitate access to CNIC information. This innovative platform leverages advanced technology to provide users with efficient and secure access to their CNIC details.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
Full-RAG: A modern architecture for hyper-personalizationZilliz
Mike Del Balso, CEO & Co-Founder at Tecton, presents "Full RAG," a novel approach to AI recommendation systems, aiming to push beyond the limitations of traditional models through a deep integration of contextual insights and real-time data, leveraging the Retrieval-Augmented Generation architecture. This talk will outline Full RAG's potential to significantly enhance personalization, address engineering challenges such as data management and model training, and introduce data enrichment with reranking as a key solution. Attendees will gain crucial insights into the importance of hyperpersonalization in AI, the capabilities of Full RAG for advanced personalization, and strategies for managing complex data integrations for deploying cutting-edge AI solutions.
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofsAlex Pruden
This paper presents Reef, a system for generating publicly verifiable succinct non-interactive zero-knowledge proofs that a committed document matches or does not match a regular expression. We describe applications such as proving the strength of passwords, the provenance of email despite redactions, the validity of oblivious DNS queries, and the existence of mutations in DNA. Reef supports the Perl Compatible Regular Expression syntax, including wildcards, alternation, ranges, capture groups, Kleene star, negations, and lookarounds. Reef introduces a new type of automata, Skipping Alternating Finite Automata (SAFA), that skips irrelevant parts of a document when producing proofs without undermining soundness, and instantiates SAFA with a lookup argument. Our experimental evaluation confirms that Reef can generate proofs for documents with 32M characters; the proofs are small and cheap to verify (under a second).
Paper: https://eprint.iacr.org/2023/1886
A tale of scale & speed: How the US Navy is enabling software delivery from l...sonjaschweigert1
Rapid and secure feature delivery is a goal across every application team and every branch of the DoD. The Navy’s DevSecOps platform, Party Barge, has achieved:
- Reduction in onboarding time from 5 weeks to 1 day
- Improved developer experience and productivity through actionable findings and reduction of false positives
- Maintenance of superior security standards and inherent policy enforcement with Authorization to Operate (ATO)
Development teams can ship efficiently and ensure applications are cyber ready for Navy Authorizing Officials (AOs). In this webinar, Sigma Defense and Anchore will give attendees a look behind the scenes and demo secure pipeline automation and security artifacts that speed up application ATO and time to production.
We will cover:
- How to remove silos in DevSecOps
- How to build efficient development pipeline roles and component templates
- How to deliver security artifacts that matter for ATO’s (SBOMs, vulnerability reports, and policy evidence)
- How to streamline operations with automated policy checks on container images
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
57. In [14]:
# Import all libraries needed for the tutorial
# General syntax to import specific functions in a library:
##from (library) import (specific library function)
from pandas import DataFrame, read_csv
# General syntax to import a library but no functions:
##import (library) as (give the library a nickname/alias)
import matplotlib.pyplot as plt
import pandas as pd #this is how I usually import pandas
import sys #only needed to determine Python version number
# Enable inline plotting
%matplotlib inline
%pylab inline
# Must get this or you will get # NameError: name 'figsize' is not defined
import matplotlib.pylab
pd.set_option('display.mpl_style', 'default') # Make the graphs a bit prettier
figsize(15, 5)
print 'Python version ' + sys.version
print 'Pandas version ' + pd.__version__
sql
In [15]:
import pandas.io.sql
import psycopg2
conn = psycopg2.connect(user='lab')
cur = conn.cursor()
print 0 ...
In [16]:
# conn.close()
Populating the interactive namespace from numpy and matplotlib
Python version 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2]
Pandas version 0.16.0
63. In [25]:
df[['when_ts','avg_bike_num']].plot()
In [26]:
from matplotlib.font_manager import FontProperties, findfont
fp = FontProperties(family='monospace',
style='normal',
variant='normal',
weight='normal',
stretch='normal',
size='medium')
font = findfont(fp)
In [27]:
df[['when_ts','avg_bike_num']].plot()
Out[25]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f3755f87110>
Out[27]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f37560d2050>
64. In [28]:
df[['when_ts','avg_bike_num']].plot(kind='kde')
In [16]:
# query db
sql = """
select * from ubike where name = ' 'and (when_ts BETWEEN '2014-12-08' AND
'2014-12-09')
order by when_ts;
"""
ponit2_df = pandas.io.sql.read_sql(sql, conn)
len(ponit2_df)
In [17]:
ponit2_df[:1]
Out[28]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f3756096910>
Out[16]:
10
Out[17]:
when_ts where_pt code name area_name space_num avg_bike_num max_bike_
0
2014-
12-08
15:00:00
(25.048268,121.552278) 18 38 13.5 15
68. In [121]:
from pandas.tools.plotting import table
fig, ax = plt.subplots(1, 1)
table(ax, np.round(df[['space_num','max_space_num','min_space_num']].describe(
), 2),
loc='upper left', colWidths=[0.1, 0.1, 0.1])
df[['space_num','max_space_num','min_space_num']].plot(table=True, ax=ax)
sql
In [124]:
# query db
sql = """
select a.when_ts as time ,
a.avg_bike_num as point_A,
b.avg_bike_num as point_B
from ubike a
inner join ubike b on
a.when_ts = b.when_ts
and (a.when_ts BETWEEN '2014-12-08' AND '2014-12-09')
and (a.name = ' ' and b.name = ' ');
"""
PointJoin = pandas.io.sql.read_sql(sql, conn)
len(PointJoin)
Out[121]:
<matplotlib.axes._subplots.AxesSubplot at 0x7fba80348ad0>
Out[124]:
10
73. In [32]:
# query db
sql = """
select name from ubike where area_name like '% %' group by name
"""
pointA = pandas.io.sql.read_sql(sql, conn)
len(pointA)
In [33]:
pointA
Out[32]:
14
Out[33]:
name
0
1
2 (2 )
3
4
5 (2 )
6
7
8
9
10
11 (2 )
12
13
74. In [90]:
# query db
sql = """
select * from ubike where name = ' ' and (when_ts BETWEEN '2014-12
-25' AND '2014-12-31')
"""
pointA = pandas.io.sql.read_sql(sql, conn)
len(pointA)
In [35]:
pointA[:1]
In [91]:
# query db
sql = """
select * from tpweather where name = ' ' and (when_ts BETWEEN '2014-1
2-25' AND '2014-12-31');
"""
weaterA = pandas.io.sql.read_sql(sql, conn)
len(weaterA)
In [37]:
weaterA[:1]
Out[90]:
145
Out[35]:
when_ts where_pt code name area_name space_num avg_bike_num max_bike_
0
2014-
12-08
15:00:00
(25.116325,121.534136) 123 44 31 33
Out[91]:
145
Out[37]:
when_ts where_pt name temp max_temp min_temp hum_pct pressure win
0
2014-
12-19
(25.1180133,121.5373439) 17.3889 17.4 16.9 76 1022.38 2.7
75. sub select
In [92]:
# query db
sql = """
select * from tpweather where when_ts in
(select when_ts
from ubike
where name = ' ' order by when_ts )
and name = ' ' and (when_ts BETWEEN '2014-12-25' AND '2014-12-31' ) ord
er by when_ts
"""
weatherA = pandas.io.sql.read_sql(sql, conn)
len(weatherA)
In [93]:
len(pointA)
In [94]:
len(weatherA)
Out[92]:
145
Out[93]:
145
Out[94]:
145