This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# join the items and reviews | |
result_df = mdsql.query( """ | |
SELECT | |
category, | |
sentiment, | |
sentiment_polarity | |
FROM gstore_apps_df INNER JOIN gstore_reviews_df | |
ON gstore_apps_df.app = gstore_reviews_df.app """, | |
gstore_apps_df = gstore_apps_df, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Single query with join and group by | |
sql_str = """ | |
SELECT | |
category, | |
avg(sentiment_polarity) as avg_sentiment_polarity, | |
avg(sentiment_subjectivity) as avg_sentiment_subjectivity | |
FROM ( | |
SELECT | |
category, | |
CAST(sentiment as float) as sentiment, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# load gstore reviews data | |
gstore_reviews_df = pd.read_csv("https://tinyurl.com/gstorereviewscsv") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Importing in memory SQL engine as mdsql | |
# in the next couple of days you will import as follows | |
# - import modin.experimental.sql as mdsql | |
# For now you can pip install the sql engine 'pip install pdsql' and include it as follows: | |
from dfsql import sql_query | |
import modin.sql as mdsql | |
mdsql.query = sql_query | |
# You can then define the query that you want to perform |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Select columns | |
result_df1 = gstore_apps_df.loc[,: ['App','Category',Rating']] | |
# From the resulting dataframe filter where Price = 0 | |
result_df = result_df1['Price'] == 0 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import modin.pandas as pd | |
# read google play app store list from csv | |
gstore_apps_df = pd.read_csv("https://tinyurl.com/googleplaystorecsv") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import modin.pandas as pd | |
gstore_apps_df = pd.read_csv("https://tinyurl.com/googleplaystorecsv") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"api": { | |
"http": { | |
"host": "0.0.0.0", | |
"port": "47334" | |
}, | |
"mysql": { | |
"host": "127.0.0.1", | |
"password": "", | |
"port": "47335", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"api": { | |
"http": { | |
"host": "0.0.0.0", | |
"port": "47334" | |
}, | |
"mysql": { | |
"host": "127.0.0.1", | |
"password": "", | |
"port": "47335", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT price AS predicted, | |
price_confidence AS confidence, | |
price_explain AS info | |
FROM mindsdb.used_cars_model | |
WHERE model = "a1" | |
AND mileage = 122946 | |
AND transmission = "manual" | |
AND fueltype = "petrol" | |
AND mpg = "35.4" | |
AND enginesize = 1.4 |
NewerOlder