titurbina
Profilo di
Nome | titurbina |
---|---|
Indirizzo email | n/a |
Messaggi | 7 |
-
- 2018-01-15 15:21:29
- Re: ImportError: No module named logging
- Forum >> Programmazione Python >> Database
- File piu grande copia incolla.
-
- 2018-01-15 13:50:22
- Re: ImportError: No module named logging
- Forum >> Programmazione Python >> Database
- Si ma la libreria Azurel è già presente ecco la risposta.
Grazie
-
- 2018-01-14 19:53:44
- Re: ImportError: No module named logging
- Forum >> Programmazione Python >> Database
- OK ecco il percorso allegato della installazione
-
- 2018-01-14 19:41:21
- Re: Attribute Error: 'property' object has no attribute 'csv'
- Forum >> Programmazione Python >> Files e Directory
import subprocess import codecs import sys reload(sys) sys.setdefaultencoding('utf-8') import os import re import time import atexit import seaborn as sns import matplotlib.pyplot as plt from pyspark import SparkConf from pyspark import SparkContext from pyspark import SQLContext import pyspark.sql.functions as F from pyspark.sql.functions import concat, col, udf, lag, date_add, explode, lit, unix_timestamp from pyspark.sql.functions import month, weekofyear, dayofmonth from pyspark.sql.types import * from pyspark.sql.types import DateType from pyspark.sql.dataframe import * from pyspark.sql.window import Window from pyspark.sql import Row from pyspark.ml.classification import * from pyspark.ml.feature import StringIndexer, OneHotEncoder, VectorAssembler, VectorIndexer from pyspark.ml.feature import StandardScaler, PCA, RFormula from pyspark.ml import Pipeline, PipelineModel start_time = time.time()
from pyspark import SQLContext # Import data from Azure Blob Storage dataFile = "wasb://sampledata@pysparksampledata.blob.core.windows.net/sampledata.csv" dataFileSep = ',' df = SQLContext.read.csv(dataFile, header=True, sep=dataFileSep, inferSchema=True, nanValue="", mode='PERMISSIVE') # Import data from the home directory on your machine # dataFile = '/home/katlin/Desktop/PysparkExample/sampledata.csv'
AttributeError Traceback (most recent call last)
<ipython-input-2-feb6a732221b> in <module>()
3 dataFile = "wasb://sampledata@pysparksampledata.blob.core.windows.net/sampledata.csv"
4 dataFileSep = ','
----> 5 df = SQLContext.read.csv(dataFile, header=True, sep=dataFileSep, inferSchema=True, nanValue="", mode='PERMISSIVE')
6
7 # Import data from the home directory on your machine
AttributeError: 'property' object has no attribute 'csv'
sia in Jupyter che in Pynthon mi da lo stesso erroe sopra riportatoGrazie
-
- 2018-01-14 16:18:54
- ImportError: No module named logging
- Forum >> Programmazione Python >> Database
-
## Setup our environment by importing required libraries
import time
import os
import glob
import urllib
# Read csv file from URL directly
import pandas as pd
# For Azure blob storage access
from azure.storage.blob import BlockBlobService
from azure.storage.blob import PublicAccess
# For creating some preliminary EDA plots.
%matplotlib inline
import matplotlib.pyplot as plt
from ggplot import *
from datetime import datetime
# Setup the pyspark environment
from pyspark.sql import SparkSession
# For logging model evaluation parameters back into the
# AML Workbench run history plots.
import logging
from azureml.logging import get_azureml_logger
amllog = logging.getLogger("azureml")
amllog.level = logging.INFO
# Turn on cell level logging.
%azureml history on
%azureml history show
# Time the notebook execution.
# This will only make sense if you "Run All" cells
tic = time.time()
logger = get_azureml_logger() # logger writes to AMLWorkbench runtime view
spark = SparkSession.builder.getOrCreate()
# Telemetry
logger.log('amlrealworld.predictivemaintenance.data_ingestion','true')
mi da il seguente errore:
Traceback (most recent call last)
<ipython-input-1-089d6c991973> in <module>()
25 # AML Workbench run history plots.
26 import logging
---> 27 from azureml.logging import get_azureml_logger
28
29 amllog = logging.getLogger("azureml")
ImportError: No module named logging
sia in Python 2.7.14 che jupyter, anche se il logging è stato installato regolarmente Grazie
-
- 2018-01-14 14:58:11
- Attribute Error: 'property' object has no attribute 'csv'
- Forum >> Programmazione Python >> Files e Directory
- Per il seguente file in Python 2.7.14 e Jupyther
import
subprocess
import
codecs
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
import os
import re
import time
import
atexit
import
seaborn as sns
import
matplotlib.pyplot as plt
from
pyspark import SparkConf
from
pyspark import SparkContext
from
pyspark import SQLContext
import
pyspark.sql.functions as F
from
pyspark.sql.functions import concat, col, udf, lag, date_add, explode, lit,
unix_timestamp
from
pyspark.sql.functions import month, weekofyear, dayofmonth
from
pyspark.sql.types import *
from
pyspark.sql.types import DateType
from
pyspark.sql.dataframe import *
from
pyspark.sql.window import Window
from
pyspark.sql import Row
from
pyspark.ml.classification import *
from
pyspark.ml.feature import StringIndexer, OneHotEncoder, VectorAssembler,
VectorIndexer
from
pyspark.ml.feature import StandardScaler, PCA, RFormula
from
pyspark.ml import Pipeline, PipelineModel
start_time = time.time()
from
pyspark import SQLContext
# Import
data from Azure Blob Storage
dataFile =
"wasb://sampledata@pysparksampledata.blob.core.windows.net/sampledata.csv"
dataFileSep
= ','
df =
SQLContext.read.csv(dataFile, header=True, sep=dataFileSep, inferSchema=True,
nanValue="", mode='PERMISSIVE')
# Import
data from the home directory on your machine
# dataFile
= '/home/katlin/Desktop/PysparkExample/sampledata.csv'
Utilizzo
sia Juyiter che Pythno 2.7.14 e RIcevo il seguente messaggio di errore:
---------------------------------------------------------------------------
AttributeError Traceback (most
recent call last)
<ipython-input-2-feb6a732221b>
in <module>()
3 dataFile =
"wasb://sampledata@pysparksampledata.blob.core.windows.net/sampledata.csv"
4 dataFileSep = ','
----> 5
df = SQLContext.read.csv(dataFile, header=True, sep=dataFileSep,
inferSchema=True, nanValue="", mode='PERMISSIVE')
6
7 # Import data from the home directory
on your machine
Attribute Error: 'property' object has no
attribute 'csv'
-
- 2017-04-15 08:46:32
- Spinner example
- Forum >> Programmazione Python >> GUI
- Sto utilizzando : Python 3.6.0 sotto Wind7; ne seguente programma:
#!/usr/bin/python 3
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
class SpinnerAnimation(Gtk.Window):
mi da il seguente errore:
JoB\Spinner\Spinner..py", line 3, in <module>
gi.require_version('Gtk', '3.0')
AttributeError: module 'gi' has no attribute 'require_version'
mi sembra di capire che manca la libreria Gtk 3 , ma dove posso scaricarla e come installarla ?
Grazie.