In [2]:
x = 1
def foo(y):
x = 5
print("Inside function", x)
foo(10)
print("Outside function", x)

Inside function 5
Outside function 1

In [3]:
x = 1
def bar(y):
print("Inside function", x)
bar(15)

Inside function 1

In [4]:
x = 1
def baz(y):
x = x + y
print("Inside function", x)
baz(100)

-------------------------------------------------
UnboundLocalErrorTraceback (most recent call last)
<ipython-input-4-af4cc070c202> in <module>
3     x = x + y
4     print("Inside function", x)
----> 5 baz(100)

<ipython-input-4-af4cc070c202> in baz(y)
1 x = 1
2 def baz(y):
----> 3     x = x + y
4     print("Inside function", x)
5 baz(100)

UnboundLocalError: local variable 'x' referenced before assignment
In [5]:
z = []
def zaq(y):
z.append(y)
zaq(15)
print("Outside function, z = ", z)

Outside function, z =  [15]

In [6]:
import pandas as pd

In [7]:
alice = pd.Series([1, 5, 4, 3])

In [8]:
alice

Out[8]:
0    1
1    5
2    4
3    3
dtype: int64
In [9]:
alice[2]

Out[9]:
4
In [10]:
alice[1:3]

Out[10]:
1    5
2    4
dtype: int64
In [12]:
for grade in alice:

Grade 1

In [13]:
alice = pd.Series([1, 5, 4, 3], index=['Algebra',
'Calculus',
'Geometry',
'Programming'])

In [15]:
alice['Calculus']

Out[15]:
5
In [16]:
alice['Programming']

Out[16]:
3
In [17]:
alice[0]

Out[17]:
1
In [18]:
s = pd.Series([5, 2, 3, 10], index=[2, 3, 1, 0])

In [19]:
s

Out[19]:
2     5
3     2
1     3
0    10
dtype: int64
In [20]:
s[2]

Out[20]:
5
In [21]:
s.loc[2]

Out[21]:
5
In [22]:
s.iloc[2]

Out[22]:
3
In [23]:
alice

Out[23]:
Algebra        1
Calculus       5
Geometry       4
Programming    3
dtype: int64
In [24]:
alice["Algebra":"Geometry"]

Out[24]:
Algebra     1
Calculus    5
Geometry    4
dtype: int64
In [25]:
alice[0:2]

Out[25]:
Algebra     1
Calculus    5
dtype: int64
In [26]:
s

Out[26]:
2     5
3     2
1     3
0    10
dtype: int64
In [27]:
s[0:3]

Out[27]:
2    5
3    2
1    3
dtype: int64
In [41]:
s = pd.Series([100, 200, 300, 15, 400],
index=[1, 15, 3, 0, 31])

In [42]:
s[0:3]

Out[42]:
1     100
15    200
3     300
dtype: int64
In [48]:
s.loc[3:31]

Out[48]:
3     300
0      15
31    400
dtype: int64
In [45]:
s[2:7]

Out[45]:
3     300
0      15
31    400
dtype: int64
In [46]:
my_list = [10, 30, 25]
my_list[1:15]

Out[46]:
[30, 25]
In [49]:
alice

Out[49]:
Algebra        1
Calculus       5
Geometry       4
Programming    3
dtype: int64
In [53]:
alice["Economics":"Zoology"]

Out[53]:
Series([], dtype: int64)
In [51]:
bob = pd.Series([4, 3, 2, 4], index=['Programming',
'Algebra',
'Calculus',
'Geometry'])

In [52]:
bob["Economics":"Zoology"]

-------------------------------------------------
ValueError      Traceback (most recent call last)
~/anaconda3/lib/python3.7/site-packages/pandas/core/indexes/base.py in get_slice_bound(self, label, side, kind)
4240             try:
-> 4241                 return self._searchsorted_monotonic(label, side)
4242             except ValueError:

~/anaconda3/lib/python3.7/site-packages/pandas/core/indexes/base.py in _searchsorted_monotonic(self, label, side)
4199
-> 4200         raise ValueError('index must be monotonic increasing or decreasing')
4201

ValueError: index must be monotonic increasing or decreasing

During handling of the above exception, another exception occurred:

KeyError        Traceback (most recent call last)
<ipython-input-52-8c6e70ee3711> in <module>
----> 1 bob["Economics":"Zoology"]

~/anaconda3/lib/python3.7/site-packages/pandas/core/series.py in __getitem__(self, key)
808             key = check_bool_indexer(self.index, key)
809
--> 810         return self._get_with(key)
811
812     def _get_with(self, key):

~/anaconda3/lib/python3.7/site-packages/pandas/core/series.py in _get_with(self, key)
813         # other: fancy integer or otherwise
814         if isinstance(key, slice):
--> 815             indexer = self.index._convert_slice_indexer(key, kind='getitem')
816             return self._get_values(indexer)
817         elif isinstance(key, ABCDataFrame):

~/anaconda3/lib/python3.7/site-packages/pandas/core/indexes/base.py in _convert_slice_indexer(self, key, kind)
1749         else:
1750             try:
-> 1751                 indexer = self.slice_indexer(start, stop, step, kind=kind)
1752             except Exception:
1753                 if is_index_slice:

~/anaconda3/lib/python3.7/site-packages/pandas/core/indexes/base.py in slice_indexer(self, start, end, step, kind)
4105         """
4106         start_slice, end_slice = self.slice_locs(start, end, step=step,
-> 4107                                                  kind=kind)
4108
4109         # return a slice

~/anaconda3/lib/python3.7/site-packages/pandas/core/indexes/base.py in slice_locs(self, start, end, step, kind)
4306         start_slice = None
4307         if start is not None:
-> 4308             start_slice = self.get_slice_bound(start, 'left', kind)
4309         if start_slice is None:
4310             start_slice = 0

~/anaconda3/lib/python3.7/site-packages/pandas/core/indexes/base.py in get_slice_bound(self, label, side, kind)
4242             except ValueError:
4243                 # raise the original KeyError
-> 4244                 raise err
4245
4246         if isinstance(slc, np.ndarray):

~/anaconda3/lib/python3.7/site-packages/pandas/core/indexes/base.py in get_slice_bound(self, label, side, kind)
4236         # we need to look up the label
4237         try:
-> 4238             slc = self._get_loc_only_exact_matches(label)
4239         except KeyError as err:
4240             try:

~/anaconda3/lib/python3.7/site-packages/pandas/core/indexes/base.py in _get_loc_only_exact_matches(self, key)
4205         get_slice_bound.
4206         """
-> 4207         return self.get_loc(key)
4208
4209     def get_slice_bound(self, label, side, kind):

~/anaconda3/lib/python3.7/site-packages/pandas/core/indexes/base.py in get_loc(self, key, method, tolerance)
3078                 return self._engine.get_loc(key)
3079             except KeyError:
-> 3080                 return self._engine.get_loc(self._maybe_cast_indexer(key))
3081
3082         indexer = self.get_indexer([key], method=method, tolerance=tolerance)

pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()

pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()

pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()

pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()

KeyError: 'Economics'
In [54]:
alice

Out[54]:
Algebra        1
Calculus       5
Geometry       4
Programming    3
dtype: int64
In [55]:
bob

Out[55]:
Programming    4
Algebra        3
Calculus       2
Geometry       4
dtype: int64
In [56]:
alice + bob

Out[56]:
Algebra        4
Calculus       7
Geometry       8
Programming    7
dtype: int64
In [57]:
alice

Out[57]:
Algebra        1
Calculus       5
Geometry       4
Programming    3
dtype: int64
In [58]:
alice.mean()

Out[58]:
3.25
In [59]:
alice.sum()

Out[59]:
13
In [60]:
alice.max()

Out[60]:
5
In [62]:
alice * 20

Out[62]:
Algebra         20
Calculus       100
Geometry        80
Programming     60
dtype: int64
In [63]:
alice

Out[63]:
Algebra        1
Calculus       5
Geometry       4
Programming    3
dtype: int64
In [64]:
alice[alice < 4]

Out[64]:
Algebra        1
Programming    3
dtype: int64
In [65]:
alice < 4

Out[65]:
Algebra         True
Calculus       False
Geometry       False
Programming     True
dtype: bool
In [66]:
mask = pd.Series([True, False, True, False],
index=['Programming',
'Algebra',
'Calculus',
'Geometry'])

In [68]:
alice

Out[68]:
Algebra        1
Calculus       5
Geometry       4
Programming    3
dtype: int64
In [70]:
~mask

Out[70]:
Programming    False
Algebra         True
Calculus       False
Geometry        True
dtype: bool
In [69]:
alice[mask]

Out[69]:
Calculus       5
Programming    3
dtype: int64
In [71]:
alice[~mask]

Out[71]:
Algebra     1
Geometry    4
dtype: int64
In [ ]:
alice['Algebra']

In [73]:
alice[['Algebra', 'Geometry']]

Out[73]:
Algebra     1
Geometry    4
dtype: int64
In [94]:
alice[alice == 5].index[0]

Out[94]:
'Calculus'
In [90]:
alice.index

Out[90]:
Index(['Algebra', 'Calculus', 'Geometry', 'Programming'], dtype='object')
In [95]:
alice

Out[95]:
Algebra        1
Calculus       5
Geometry       4
Programming    3
dtype: int64
In [124]:
# 1. Найти максимум среди всех оценок alice, меньших 4
alice[alice < 4].max()
# 2. Найти количество оценок alice, меньших 4
len(alice[alice < 4])
alice[alice < 4].count()
# 3. Найти среднюю оценку bob по тем предметам,
#    по которым у alice оценка больше 3
int(bob[alice > 3].mean())

Out[124]:
3
In [105]:
claudia = pd.Series([1, 2, 5], index=['Algebra',
'Music',
'Biology'])

In [117]:
(claudia + alice).count()

Out[117]:
1
In [119]:
len(claudia + alice)

Out[119]:
6
In [116]:
claudia.add(alice, fill_value=0).astype(int)

Out[116]:
Algebra        2
Biology        5
Calculus       5
Geometry       4
Music          2
Programming    3
dtype: int64
In [110]:
float("NaN")

Out[110]:
nan
In [125]:
gradebook = pd.DataFrame([[3, 2, 5, 4],
[1, 3, 2, 5],
[4, 3, 2, 5]],
index=['Alice', 'Bob',
'Claudia'],
columns=['Algebra',
'Calculus',
'Geometry',
'Music'])

In [127]:
gradebook['Algebra']

Out[127]:
Alice      3
Bob        1
Claudia    4
Name: Algebra, dtype: int64
In [135]:
gradebook['Alice':'Alice']

Out[135]:
Algebra Calculus Geometry Music
Alice 3 2 5 4
In [133]:
gradebook.loc['Alice']

Out[133]:
Algebra     3
Calculus    2
Geometry    5
Music       4
Name: Alice, dtype: int64
In [134]:
gradebook.iloc[1]

Out[134]:
Algebra     1
Calculus    3
Geometry    2
Music       5
Name: Bob, dtype: int64
In [138]:
df = pd.read_excel("Documents/zzz.xlsx")

In [139]:
df

Out[139]:
Algebra Calculus
Alice 2 3
Bob 4 5
In [142]:
gradebook.iloc[1:, 1]

Out[142]:
Bob        3
Claudia    3
Name: Calculus, dtype: int64
In [143]:
gradebook.loc[:, 'Algebra']

Out[143]:
Alice      3
Bob        1
Claudia    4
Name: Algebra, dtype: int64
In [144]:
gradebook.loc[:, 'Algebra':'Calculus']

Out[144]:
Algebra Calculus
Alice 3 2
Bob 1 3
Claudia 4 3
In [151]:
gradebook[(gradebook['Algebra'] > 2) &

Out[151]:
Algebra Calculus Geometry Music
Alice 3 2 5 4
In [156]:
gradebook[(gradebook['Algebra'] > 2) |

Out[156]:
Algebra Calculus Geometry Music
Alice 3 2 5 4
Claudia 4 3 2 5
In [167]:
gradebook.mean()

Out[167]:
Algebra     2.666667
Calculus    2.666667
Geometry    3.000000
Music       4.666667
dtype: float64
In [169]:
gradebook.mean(axis=0)

Out[169]:
Algebra     2.666667
Calculus    2.666667
Geometry    3.000000
Music       4.666667
dtype: float64
In [170]:
df = pd.read_csv("https://bit.ly/2Bub7f8")

In [173]:
df = pd.read_csv("Documents/electors.csv")

In [174]:
df

Out[174]:
state electors
0 Alabama 9
2 Arizona 11
3 Arkansas 6
4 California 55
6 Connecticut 7
7 D.C. 3
8 Delaware 3
9 Florida 29
10 Georgia 16
11 Hawaii 4
12 Idaho 4
13 Illinois 20
14 Indiana 11
15 Iowa 6
16 Kansas 6
17 Kentucky 8
18 Louisiana 8
19 Maine 4
20 Maryland 10
21 Massachusetts 11
22 Michigan 16
23 Minnesota 10
24 Mississippi 6
25 Missouri 10
26 Montana 3
29 New Hampshire 4
30 New Jersey 14
31 New Mexico 5
32 New York 29
33 North Carolina 15
34 North Dakota 3
35 Ohio 18
36 Oklahoma 7
37 Oregon 7
38 Pennsylvania 20
39 Rhode Island 4
40 South Carolina 9
41 South Dakota 3
42 Tennessee 11
43 Texas 38
44 Utah 6
45 Vermont 3
46 Virginia 13
47 Washington 12
48 West Virginia 5
49 Wisconsin 10
50 Wyoming 3
In [175]:
df = pd.read_csv("https://bit.ly/2BYqr3c")

In [181]:
df['color'].value_counts()

Out[181]:
Color               4815
Black and White     209
Name: color, dtype: int64
In [183]:
%matplotlib inline
df['color'].value_counts().plot.bar()

Out[183]:
<matplotlib.axes._subplots.AxesSubplot at 0x115dc5240>
In [193]:
df['country'].value_counts()[:10]

Out[193]:
USA          3807
UK            448
France        154
Germany        97
Australia      55
India          34
Spain          33
China          30
Japan          23
Name: country, dtype: int64
In [195]:
import matplotlib.pyplot as plt
plt.figure(figsize=(5, 5))
df['country'].value_counts()[:5].plot.pie()
plt.tight_layout()
plt.savefig("my_nice_figure.png", dpi=300)

In [198]:
df.plot(x='director_facebook_likes',
y='imdb_score',
kind='scatter')

Out[198]:
<matplotlib.axes._subplots.AxesSubplot at 0x117dd33c8>
In [199]:


Out[199]:
0 Color James Cameron 723.0 178.0 0.0 855.0 Joel David Moore 1000.0 760505847.0 Action|Adventure|Fantasy|Sci-Fi ... 3054.0 English USA PG-13 237000000.0 2009.0 936.0 7.9 1.78 33000
1 Color Gore Verbinski 302.0 169.0 563.0 1000.0 Orlando Bloom 40000.0 309404152.0 Action|Adventure|Fantasy ... 1238.0 English USA PG-13 300000000.0 2007.0 5000.0 7.1 2.35 0
2 Color Sam Mendes 602.0 148.0 0.0 161.0 Rory Kinnear 11000.0 200074175.0 Action|Adventure|Thriller ... 994.0 English UK PG-13 245000000.0 2015.0 393.0 6.8 2.35 85000
3 Color Christopher Nolan 813.0 164.0 22000.0 23000.0 Christian Bale 27000.0 448130642.0 Action|Thriller ... 2701.0 English USA PG-13 250000000.0 2012.0 23000.0 8.5 2.35 164000
4 NaN Doug Walker NaN NaN 131.0 NaN Rob Walker 131.0 NaN Documentary ... NaN NaN NaN NaN NaN NaN 12.0 7.1 NaN 0
5 Color Andrew Stanton 462.0 132.0 475.0 530.0 Samantha Morton 640.0 73058679.0 Action|Adventure|Sci-Fi ... 738.0 English USA PG-13 263700000.0 2012.0 632.0 6.6 2.35 24000
6 Color Sam Raimi 392.0 156.0 0.0 4000.0 James Franco 24000.0 336530303.0 Action|Adventure|Romance ... 1902.0 English USA PG-13 258000000.0 2007.0 11000.0 6.2 2.35 0
7 Color Nathan Greno 324.0 100.0 15.0 284.0 Donna Murphy 799.0 200807262.0 Adventure|Animation|Comedy|Family|Fantasy|Musi... ... 387.0 English USA PG 260000000.0 2010.0 553.0 7.8 1.85 29000
8 Color Joss Whedon 635.0 141.0 0.0 19000.0 Robert Downey Jr. 26000.0 458991599.0 Action|Adventure|Sci-Fi ... 1117.0 English USA PG-13 250000000.0 2015.0 21000.0 7.5 2.35 118000
9 Color David Yates 375.0 153.0 282.0 10000.0 Daniel Radcliffe 25000.0 301956980.0 Adventure|Family|Fantasy|Mystery ... 973.0 English UK PG 250000000.0 2009.0 11000.0 7.5 2.35 10000
10 Color Zack Snyder 673.0 183.0 0.0 2000.0 Lauren Cohan 15000.0 330249062.0 Action|Adventure|Sci-Fi ... 3018.0 English USA PG-13 250000000.0 2016.0 4000.0 6.9 2.35 197000
11 Color Bryan Singer 434.0 169.0 0.0 903.0 Marlon Brando 18000.0 200069408.0 Action|Adventure|Sci-Fi ... 2367.0 English USA PG-13 209000000.0 2006.0 10000.0 6.1 2.35 0
12 Color Marc Forster 403.0 106.0 395.0 393.0 Mathieu Amalric 451.0 168368427.0 Action|Adventure ... 1243.0 English UK PG-13 200000000.0 2008.0 412.0 6.7 2.35 0
13 Color Gore Verbinski 313.0 151.0 563.0 1000.0 Orlando Bloom 40000.0 423032628.0 Action|Adventure|Fantasy ... 1832.0 English USA PG-13 225000000.0 2006.0 5000.0 7.3 2.35 5000
14 Color Gore Verbinski 450.0 150.0 563.0 1000.0 Ruth Wilson 40000.0 89289910.0 Action|Adventure|Western ... 711.0 English USA PG-13 215000000.0 2013.0 2000.0 6.5 2.35 48000
15 Color Zack Snyder 733.0 143.0 0.0 748.0 Christopher Meloni 15000.0 291021565.0 Action|Adventure|Fantasy|Sci-Fi ... 2536.0 English USA PG-13 225000000.0 2013.0 3000.0 7.2 2.35 118000
16 Color Andrew Adamson 258.0 150.0 80.0 201.0 Pierfrancesco Favino 22000.0 141614023.0 Action|Adventure|Family|Fantasy ... 438.0 English USA PG 225000000.0 2008.0 216.0 6.6 2.35 0
17 Color Joss Whedon 703.0 173.0 0.0 19000.0 Robert Downey Jr. 26000.0 623279547.0 Action|Adventure|Sci-Fi ... 1722.0 English USA PG-13 220000000.0 2012.0 21000.0 8.1 1.85 123000
18 Color Rob Marshall 448.0 136.0 252.0 1000.0 Sam Claflin 40000.0 241063875.0 Action|Adventure|Fantasy ... 484.0 English USA PG-13 250000000.0 2011.0 11000.0 6.7 2.35 58000
19 Color Barry Sonnenfeld 451.0 106.0 188.0 718.0 Michael Stuhlbarg 10000.0 179020854.0 Action|Adventure|Comedy|Family|Fantasy|Sci-Fi ... 341.0 English USA PG-13 225000000.0 2012.0 816.0 6.8 1.85 40000
20 Color Peter Jackson 422.0 164.0 0.0 773.0 Adam Brown 5000.0 255108370.0 Adventure|Fantasy ... 802.0 English New Zealand PG-13 250000000.0 2014.0 972.0 7.5 2.35 65000
21 Color Marc Webb 599.0 153.0 464.0 963.0 Andrew Garfield 15000.0 262030663.0 Action|Adventure|Fantasy ... 1225.0 English USA PG-13 230000000.0 2012.0 10000.0 7.0 2.35 56000
22 Color Ridley Scott 343.0 156.0 0.0 738.0 William Hurt 891.0 105219735.0 Action|Adventure|Drama|History ... 546.0 English USA PG-13 200000000.0 2010.0 882.0 6.7 2.35 17000
23 Color Peter Jackson 509.0 186.0 0.0 773.0 Adam Brown 5000.0 258355354.0 Adventure|Fantasy ... 951.0 English USA PG-13 225000000.0 2013.0 972.0 7.9 2.35 83000
24 Color Chris Weitz 251.0 113.0 129.0 1000.0 Eva Green 16000.0 70083519.0 Adventure|Family|Fantasy ... 666.0 English USA PG-13 180000000.0 2007.0 6000.0 6.1 2.35 0
25 Color Peter Jackson 446.0 201.0 0.0 84.0 Thomas Kretschmann 6000.0 218051260.0 Action|Adventure|Drama|Romance ... 2618.0 English New Zealand PG-13 207000000.0 2005.0 919.0 7.2 2.35 0
26 Color James Cameron 315.0 194.0 0.0 794.0 Kate Winslet 29000.0 658672302.0 Drama|Romance ... 2528.0 English USA PG-13 200000000.0 1997.0 14000.0 7.7 2.35 26000
27 Color Anthony Russo 516.0 147.0 94.0 11000.0 Scarlett Johansson 21000.0 407197282.0 Action|Adventure|Sci-Fi ... 1022.0 English USA PG-13 250000000.0 2016.0 19000.0 8.2 2.35 72000
28 Color Peter Berg 377.0 131.0 532.0 627.0 Alexander Skarsgård 14000.0 65173160.0 Action|Adventure|Sci-Fi|Thriller ... 751.0 English USA PG-13 209000000.0 2012.0 10000.0 5.9 2.35 44000
29 Color Colin Trevorrow 644.0 124.0 365.0 1000.0 Judy Greer 3000.0 652177271.0 Action|Adventure|Sci-Fi|Thriller ... 1290.0 English USA PG-13 150000000.0 2015.0 2000.0 7.0 2.00 150000
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
5013 Color Eric Eason 28.0 79.0 3.0 42.0 Panchito Gómez 93.0 NaN Drama|Family ... 21.0 English USA NaN 24000.0 2002.0 46.0 7.0 1.78 61
5014 Color Uwe Boll 58.0 80.0 892.0 492.0 Katharine Isabelle 986.0 NaN Action|Crime|Thriller ... 129.0 English Canada R NaN 2009.0 918.0 6.3 2.35 0
5015 Black and White Richard Linklater 61.0 100.0 0.0 0.0 Richard Linklater 5.0 1227508.0 Comedy|Drama ... 80.0 English USA R 23000.0 1991.0 0.0 7.1 1.37 2000
5016 Color Joseph Mazzella NaN 90.0 0.0 9.0 Mikaal Bates 313.0 NaN Crime|Drama|Thriller ... 2.0 English USA NaN 25000.0 2015.0 25.0 4.8 NaN 33
5017 Color Travis Legge 1.0 90.0 138.0 138.0 Suzi Lorraine 370.0 NaN Comedy|Romance ... 3.0 English USA NaN 22000.0 2013.0 184.0 3.3 1.78 200
5018 Color Alex Kendrick 5.0 120.0 589.0 4.0 Lisa Arnold 51.0 NaN Drama ... 49.0 English USA NaN 20000.0 2003.0 49.0 6.9 1.85 725
5019 Color Marcus Nispel 43.0 91.0 158.0 265.0 Brittany Curran 630.0 NaN Horror|Mystery|Thriller ... 33.0 English USA R NaN 2015.0 512.0 4.6 1.85 0
5020 NaN Brandon Landers NaN 143.0 8.0 8.0 Alana Kaniewski 720.0 NaN Drama|Horror|Thriller ... 8.0 English USA NaN 17350.0 2011.0 19.0 3.0 NaN 33
5021 Color Jay Duplass 51.0 85.0 157.0 10.0 Katie Aselton 830.0 192467.0 Comedy|Drama|Romance ... 71.0 English USA R 15000.0 2005.0 224.0 6.6 NaN 297
5022 Black and White Jim Chuchu 6.0 60.0 0.0 4.0 Olwenya Maina 147.0 NaN Drama ... 1.0 Swahili Kenya NaN 15000.0 2014.0 19.0 7.4 NaN 45
5023 Color Daryl Wein 22.0 88.0 38.0 211.0 Heather Burns 331.0 76382.0 Romance ... 8.0 English USA NaN 15000.0 2009.0 212.0 6.2 2.35 324
5024 Color Jason Trost 42.0 78.0 91.0 86.0 Jason Trost 407.0 NaN Sci-Fi|Thriller ... 35.0 English USA Unrated 20000.0 2011.0 91.0 4.0 2.35 835
5025 Color John Waters 73.0 108.0 0.0 105.0 Mink Stole 462.0 180483.0 Comedy|Crime|Horror ... 183.0 English USA NC-17 10000.0 1972.0 143.0 6.1 1.37 0
5026 Color Olivier Assayas 81.0 110.0 107.0 45.0 Béatrice Dalle 576.0 136007.0 Drama|Music|Romance ... 39.0 French France R 4500.0 2004.0 133.0 6.9 2.35 171
5027 Color Jafar Panahi 64.0 90.0 397.0 0.0 Nargess Mamizadeh 5.0 673780.0 Drama ... 26.0 Persian Iran Not Rated 10000.0 2000.0 0.0 7.5 1.85 697
5028 Black and White Ivan Kavanagh 12.0 83.0 18.0 0.0 Michael Parle 10.0 NaN Horror ... 1.0 English Ireland NaN 10000.0 2007.0 5.0 6.7 1.33 105
5029 Color Kiyoshi Kurosawa 78.0 111.0 62.0 6.0 Anna Nakagawa 89.0 94596.0 Crime|Horror|Mystery|Thriller ... 50.0 Japanese Japan NaN 1000000.0 1997.0 13.0 7.4 1.85 817
5030 Color Tadeo Garcia NaN 84.0 5.0 12.0 Michael Cortez 21.0 NaN Drama ... 3.0 English USA NaN NaN 2004.0 20.0 6.1 NaN 22
5031 Color Thomas L. Phillips 13.0 82.0 120.0 84.0 Joe Coffey 785.0 NaN Comedy|Horror|Thriller ... 8.0 English USA NaN 200000.0 2012.0 98.0 5.4 16.00 424
5032 Color Ash Baron-Cohen 10.0 98.0 3.0 152.0 Stanley B. Herman 789.0 NaN Crime|Drama ... 14.0 English USA NaN NaN 1995.0 194.0 6.4 NaN 20
5033 Color Shane Carruth 143.0 77.0 291.0 8.0 David Sullivan 291.0 424760.0 Drama|Sci-Fi|Thriller ... 371.0 English USA PG-13 7000.0 2004.0 45.0 7.0 1.85 19000
5034 Color Neill Dela Llana 35.0 80.0 0.0 0.0 Edgar Tancangco 0.0 70071.0 Thriller ... 35.0 English Philippines Not Rated 7000.0 2005.0 0.0 6.3 NaN 74
5035 Color Robert Rodriguez 56.0 81.0 0.0 6.0 Peter Marquardt 121.0 2040920.0 Action|Crime|Drama|Romance|Thriller ... 130.0 Spanish USA R 7000.0 1992.0 20.0 6.9 1.37 0
5036 Color Anthony Vallone NaN 84.0 2.0 2.0 John Considine 45.0 NaN Crime|Drama ... 1.0 English USA PG-13 3250.0 2005.0 44.0 7.8 NaN 4
5037 Color Edward Burns 14.0 95.0 0.0 133.0 Caitlin FitzGerald 296.0 4584.0 Comedy|Drama ... 14.0 English USA Not Rated 9000.0 2011.0 205.0 6.4 NaN 413
5038 Color Scott Smith 1.0 87.0 2.0 318.0 Daphne Zuniga 637.0 NaN Comedy|Drama ... 6.0 English Canada NaN NaN 2013.0 470.0 7.7 NaN 84
5039 Color NaN 43.0 43.0 NaN 319.0 Valorie Curry 841.0 NaN Crime|Drama|Mystery|Thriller ... 359.0 English USA TV-14 NaN NaN 593.0 7.5 16.00 32000
5040 Color Benjamin Roberds 13.0 76.0 0.0 0.0 Maxwell Moody 0.0 NaN Drama|Horror|Thriller ... 3.0 English USA NaN 1400.0 2013.0 0.0 6.3 NaN 16
5041 Color Daniel Hsia 14.0 100.0 0.0 489.0 Daniel Henney 946.0 10443.0 Comedy|Drama|Romance ... 9.0 English USA PG-13 NaN 2012.0 719.0 6.3 2.35 660
5042 Color Jon Gunn 43.0 90.0 16.0 16.0 Brian Herzlinger 86.0 85222.0 Documentary ... 84.0 English USA PG 1100.0 2004.0 23.0 6.6 1.85 456

5043 rows × 28 columns

In [ ]: