In [0]:
import pandas as pd
from fbprophet import Prophet 

df = pd.read_csv('https://raw.githubusercontent.com/danielcaraway/data/master/Zip_Zhvi_SingleFamilyResidence.csv', encoding='latin')
In [0]:
# for state in set(df['State']):
#   state_df = df[df['State'] == state]
#   state_df
#   print(state)
In [0]:
# m = Prophet()
# m.fit(df)
# future = m.make_future_dataframe(periods=12, freq='M')
# future.tail()
In [0]:
CA = df[df['State'] == 'CA']
In [11]:
CA.T
Out[11]:
13 21 39 43 87 93 98 102 111 113 114 116 127 134 135 138 141 153 163 167 172 179 187 188 196 199 202 208 209 219 220 229 235 241 248 249 253 255 269 270 ... 29395 29412 29413 29439 29448 29460 29509 29510 29519 29542 29583 29616 29626 29627 29659 29672 29679 29721 29806 29817 29834 29895 29922 29968 29996 30009 30025 30038 30039 30062 30217 30220 30231 30250 30267 30278 30350 30420 30422 30428
RegionID 97564 96107 97771 96027 97711 97565 96015 98325 96239 96193 96025 96990 96467 97764 96007 96545 97431 97740 98304 96987 96047 96817 98432 96825 98411 97023 96667 96882 96546 96643 96000 97743 96934 96125 96083 96477 95985 96651 96368 96208 ... 98651 98627 98634 98273 96802 98109 98534 98629 98535 98370 97299 97339 98390 98607 97332 97888 98653 98642 98128 98638 98397 98630 98056 98654 98531 97720 98402 97259 98595 98509 96813 98650 97264 97306 98589 98009 98059 98400 98152 97209
RegionName 94109 90250 94565 90046 94501 94110 90034 95630 90805 90650 90044 92683 91709 94558 90026 91910 93722 94533 95608 92677 90066 92336 95823 92345 95747 92804 92126 92503 91911 92101 90019 94536 92592 90280 90201 91730 90004 92109 91342 90706 ... 96133 96108 96115 95550 92318 95325 95984 96110 95986 95679 93512 93563 95699 96085 93554 94950 96135 96123 95347 96119 95715 96111 95226 96136 95981 94512 95724 93429 96068 95958 92332 96132 93435 93519 96061 95141 95229 95721 95375 93282
City San Francisco Hawthorne Pittsburg Los Angeles Alameda San Francisco Los Angeles Folsom Long Beach Norwalk Los Angeles Westminster Chino Hills Napa Los Angeles Chula Vista Fresno Fairfield Carmichael Laguna Niguel Los Angeles Fontana Sacramento Hesperia Roseville Anaheim San Diego Riverside Chula Vista San Diego Los Angeles Fremont Temecula South Gate Bell Rancho Cucamonga Los Angeles San Diego Los Angeles Bellflower ... Coleville New Pine Creek Lake City Korbel Loma Linda Hornitos Twain Cedarville Washington Brooks Benton Valyermo Plymouth Klamath River Randsburg Point Reyes Station Chilcoot Ravendale Coulterville Madeline Soda Springs Truckee Valley Springs Wendel Strawberry Valley Birds Landing Soda Springs Casmalia Nubieber Nelson Essex Termo Harmony Mojave Mill Creek San Jose Vallecito Twin Bridges Strawberry Tulare
State CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA ... CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA
Metro San Francisco-Oakland-Hayward Los Angeles-Long Beach-Anaheim San Francisco-Oakland-Hayward Los Angeles-Long Beach-Anaheim San Francisco-Oakland-Hayward San Francisco-Oakland-Hayward Los Angeles-Long Beach-Anaheim Sacramento--Roseville--Arden-Arcade Los Angeles-Long Beach-Anaheim Los Angeles-Long Beach-Anaheim Los Angeles-Long Beach-Anaheim Los Angeles-Long Beach-Anaheim Riverside-San Bernardino-Ontario Napa Los Angeles-Long Beach-Anaheim San Diego-Carlsbad Fresno Vallejo-Fairfield Sacramento--Roseville--Arden-Arcade Los Angeles-Long Beach-Anaheim Los Angeles-Long Beach-Anaheim Riverside-San Bernardino-Ontario Sacramento--Roseville--Arden-Arcade Riverside-San Bernardino-Ontario Sacramento--Roseville--Arden-Arcade Los Angeles-Long Beach-Anaheim San Diego-Carlsbad Riverside-San Bernardino-Ontario San Diego-Carlsbad San Diego-Carlsbad Los Angeles-Long Beach-Anaheim San Francisco-Oakland-Hayward Riverside-San Bernardino-Ontario Los Angeles-Long Beach-Anaheim Los Angeles-Long Beach-Anaheim Riverside-San Bernardino-Ontario Los Angeles-Long Beach-Anaheim San Diego-Carlsbad Los Angeles-Long Beach-Anaheim Los Angeles-Long Beach-Anaheim ... NaN NaN NaN Eureka-Arcata-Fortuna Riverside-San Bernardino-Ontario NaN NaN NaN Truckee-Grass Valley Sacramento--Roseville--Arden-Arcade NaN Los Angeles-Long Beach-Anaheim NaN NaN Bakersfield San Francisco-Oakland-Hayward NaN Susanville NaN Susanville Sacramento--Roseville--Arden-Arcade Truckee-Grass Valley NaN Susanville NaN Vallejo-Fairfield Sacramento--Roseville--Arden-Arcade Santa Maria-Santa Barbara Susanville Chico Riverside-San Bernardino-Ontario Susanville San Luis Obispo-Paso Robles-Arroyo Grande Bakersfield Red Bluff San Jose-Sunnyvale-Santa Clara NaN Sacramento--Roseville--Arden-Arcade Sonora Visalia-Porterville
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
2019-08 2653455 656051 582565 1599202 1051526 1519441 1349303 567146 473754 491376 450409 691010 694538 708348 908292 559840 261673 407531 415286 935807 1387776 464913 290535 262259 501216 601938 642686 409037 510624 633913 1080966 1065864 490562 454326 457030 473008 1410510 1139012 537572 532307 ... 186562 122900 186439 351486 288300 269116 203509 195982 290680 398966 161178 244706 381908 190915 56365 1091937 118897 78943 288052 123214 317487 436184 234790 128262 210993 515536 595441 303704 35479 217028 83184 100094 1248867 75413 168165 1203807 221118 293416 272186 156855
2019-09 2659471 656649 581526 1619582 1054081 1514216 1345223 566623 474411 492376 451038 695996 693839 705082 914549 559283 261935 408757 414969 939643 1378156 464694 291555 262914 502375 605960 640842 408734 509695 632385 1087594 1059737 489564 455953 458105 472993 1428455 1137996 537209 532428 ... 188028 122604 185994 350781 290130 268205 201438 196612 287650 401212 161750 244372 380762 190029 56761 1074031 117972 78828 284831 123459 317284 438923 239133 127287 211683 519358 588117 299856 35362 219946 83341 99579 1257471 76053 163320 1191099 220298 288793 267689 156706
2019-10 2673801 661550 579674 1643242 1050810 1528685 1364396 568343 479144 495968 455674 700008 696604 707078 925543 559808 263232 409577 417375 941765 1393827 466856 292639 264367 503032 608590 641065 410855 510133 630527 1095400 1053801 491621 460632 462020 475057 1444676 1137892 542226 536220 ... 188684 123218 186395 350762 290945 268901 202583 196448 285791 408741 161919 246366 381065 190242 56868 1083932 118246 79690 281684 124067 314364 439514 239134 127107 213177 514327 586509 298543 35310 223570 82772 100346 1268375 76136 160965 1161763 220130 281784 264456 156429
2019-11 2688969 665524 579779 1655745 1050477 1543451 1377603 574112 483458 499044 459955 703092 700361 709361 938164 563147 264175 408868 422164 940557 1403665 469373 295587 265595 504793 610676 644014 411709 513543 631025 1102490 1049932 492499 464322 465678 477476 1461110 1141148 546469 539458 ... 189530 123444 187054 349001 292025 268450 202757 197243 283300 415143 162674 244359 382664 191009 57576 1084112 118161 79846 279477 123657 308382 440593 236939 127176 214909 510921 583531 298182 35253 227877 80704 101089 1279186 75961 159109 1123331 219565 277526 263067 155899
2019-12 2717489 670833 582825 1668029 1058938 1559411 1394108 578849 488025 503135 465529 705968 704516 711231 951057 566902 264902 407549 426665 940177 1414064 471983 298312 266905 507717 611783 648423 414720 517343 633181 1115406 1053446 496358 468472 470021 480022 1475343 1151466 552347 544104 ... 189174 123680 187670 347579 293337 269357 203140 197338 285543 415673 162519 239410 383194 191545 58749 1093868 118251 79676 278140 123284 302968 441833 236219 127193 216737 510093 579300 301347 35267 233964 80118 102194 1294008 76004 158119 1105216 219973 273191 263347 157523

292 rows × 1685 columns

In [0]: