This file contains hidden or 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 pandas as pd | |
| list_of_names = ["Ron","Jeremy","Rohit","Brian","Rich"] | |
| roll_number = [1,2,3,4,5] | |
| series = pd.Series(data=list_of_names,index=roll_number) | |
| series |
This file contains hidden or 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 pandas as pd | |
| dict_of_information = { | |
| 1:"Ron", | |
| 2:"Jeremy", | |
| 3:"Rohit", | |
| 4:"Brian", | |
| 500:"Rich" | |
| } |
This file contains hidden or 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 pandas as pd | |
| list_of_names = ["Ron","Jeremy","Rohit","Brian","Rich"] | |
| series = pd.Series(data=list_of_names) | |
| series |
This file contains hidden or 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 pandas as pd | |
| list_of_names_1 = ["Ron","Jeremy","Rohit","Brian","Rich"] | |
| list_of_names_l = ["Harris","Brack","Shetty","Van","Cherodio"] | |
| series1 = pd.Series(data=list_of_names) | |
| series2 = pd.Series(data=list_of_names) | |
| finalseries = series1+" "+series2 | |
| finalseries |
This file contains hidden or 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 pandas as pd | |
| list_of_numbers1 = [100,200,300,400,500] | |
| index_number1 = [1,2,3,4,5] | |
| list_of_numbers2 = [200,300,400,500,600] | |
| index_number2 = [10,20,30,40,50] | |
| series1 = pd.Series(data=list_of_numbers1,index=index_number1) | |
| series2 = pd.Series(data=list_of_numbers2,index=index_number2) |
This file contains hidden or 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 pandas as pd | |
| list_of_numbers1 = [100,200,300,400,500] | |
| index_number1 = [1,2,3,4,5] | |
| list_of_numbers2 = [200,300,400,500,600] | |
| index_number2 = [10,20,30,40,50] | |
| series1 = pd.Series(data=list_of_numbers1,index=index_number1) | |
| series2 = pd.Series(data=list_of_numbers2,index=index_number2) |
This file contains hidden or 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 pandas as pd | |
| column_names = ["sepal length","sepal width","petal length","petal width","Type of flower"] | |
| df = pd.read_csv("https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data", | |
| names=column_names) | |
| df.head() |
This file contains hidden or 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 pandas as pd | |
| column_names = ["sepal length","sepal width","petal length","petal width","Type of flower"] | |
| df = pd.read_csv("https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data", | |
| names=column_names) | |
| df.describe() |
This file contains hidden or 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 pandas as pd | |
| column_names = ["sepal length","sepal width","petal length","petal width","Type of flower"] | |
| df = pd.read_csv("https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data", | |
| names=column_names) | |
| df.shape |
This file contains hidden or 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 pandas as pd | |
| column_names = ["sepal length","sepal width","petal length","petal width","Type of flower"] | |
| df = pd.read_csv("https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data", | |
| names=column_names) | |
| print("The shape of dataframe is {0}".format(df.shape)) | |
| print("The dimension of dataframe is {0}".format(df.ndim)) | |
| print("The size of dataframe is {0}".format(df.size)) | |
| print("The dtype of data is {0}".format(df.dtypes)) | |
| print("The values of data is {0}".format(df.values)) |
OlderNewer